forked from inversify/inversify-express-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
123 lines (121 loc) · 3.4 KB
/
.eslintrc.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
warnOnUnsupportedTypeScriptVersion: false,
},
extends: [
'airbnb-typescript/base',
'plugin:@typescript-eslint/recommended',
],
env: {
node: true,
},
rules: {
'arrow-parens': ['error', 'as-needed', {
requireForBlockBody: false,
}],
'class-methods-use-this': 'off',
'constructor-super': 'error',
'handle-callback-err': 'error',
'no-await-in-loop': 'off',
'no-class-assign': 'error',
'no-continue': 'off',
'import/no-cycle': 'off',
'no-mixed-operators': ['error', {
allowSamePrecedence: true,
}],
'no-mixed-requires': 'error',
'no-new-require': 'error',
'no-path-concat': 'error',
'no-restricted-syntax': ['error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'no-this-before-super': 'error',
'no-underscore-dangle': 'off',
'prefer-destructuring': ['error', {
'VariableDeclarator': {
array: false,
object: true,
},
'AssignmentExpression': {
array: false,
object: true,
}
}, {
enforceForRenamedProperties: false,
}],
'strict': ['error', 'global'],
'template-curly-spacing': ['error', 'always'],
'import/named': 'error',
'import/prefer-default-export': 'off',
'@typescript-eslint/array-type': ['error', {
default: 'generic',
}],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/explicit-function-return-type': ['error', {
allowExpressions: true,
}],
'@typescript-eslint/explicit-member-accessibility': ['error', {
'overrides': {
constructors: 'no-public',
}
}],
'@typescript-eslint/explicit-module-boundary-types': ['error', {
allowArgumentsExplicitlyTypedAsAny: true,
}],
'@typescript-eslint/indent': ['error', 4, {
SwitchCase: 1,
VariableDeclarator: 1,
outerIIFEBody: 1,
MemberExpression: 0,
FunctionDeclaration: {
parameters: 1,
body: 1,
},
FunctionExpression: {
parameters: 1,
body: 1,
},
CallExpression: {
arguments: 1,
},
ArrayExpression: 1,
ObjectExpression: 1,
ImportDeclaration: 1,
flatTernaryExpressions: false,
ignoredNodes: [
'JSXExpressionContainer > ConditionalExpression'
],
ignoreComments: false,
}],
'@typescript-eslint/lines-between-class-members': ['error', 'always', {
exceptAfterSingleLine: true,
}],
'@typescript-eslint/naming-convention': [
"error",
{
selector: ['enum'],
format: ['UPPER_CASE'],
}
],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': ['error', {
vars: 'all',
args: 'after-used',
ignoreRestSiblings: true,
}],
'@typescript-eslint/no-use-before-define': ['error', 'nofunc'],
'@typescript-eslint/object-curly-spacing': ['error', 'never'],
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/unbound-method': 'error',
},
};