-
Notifications
You must be signed in to change notification settings - Fork 2
/
typescript.js
45 lines (45 loc) · 1.94 KB
/
typescript.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
module.exports = {
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/typescript',
],
parserOptions: {
project: './tsconfig.json',
},
plugins: ['@typescript-eslint', 'import', 'functional'],
rules: {
'@typescript-eslint/consistent-type-exports': 2,
'@typescript-eslint/consistent-type-imports': 2,
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'indent': 0,
'@typescript-eslint/indent': [
'error', 2, {
VariableDeclarator: { const: 3, let: 2, var: 2 },
ignoredNodes: ['JSXAttribute', 'JSXSpreadAttribute'],
SwitchCase: 1,
},
],
'@typescript-eslint/no-empty-function': [1, { allow: ['arrowFunctions'] }],
'@typescript-eslint/no-empty-interface': 0,
'@typescript-eslint/no-implied-eval': 0,
'@typescript-eslint/no-misused-promises': ['error', { checksVoidReturn: false }],
'@typescript-eslint/no-shadow': 1,
'no-shadow': 0,
'@typescript-eslint/no-unnecessary-type-assertion': 0,
'@typescript-eslint/no-unsafe-argument': 1,
'@typescript-eslint/no-unsafe-assignment': 0,
// would like to have these but they don't work well..
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/no-use-before-define': ['error', { classes: true, functions: true, variables: false }],
'@typescript-eslint/prefer-includes': 2,
'@typescript-eslint/promise-function-async': [2],
'@typescript-eslint/restrict-template-expressions': 0,
'@typescript-eslint/type-annotation-spacing': [2, { after: true, before: false, overrides: { arrow: { after: true, before: true } } }],
'@typescript-eslint/unbound-method': ['error', { ignoreStatic: true }],
},
}