-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
197 lines (197 loc) · 5.39 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
module.exports = {
env: {
browser: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
extends: ['plugin:import/typescript'],
settings: {
'import/resolver': {
typescript: {},
},
},
plugins: ['@typescript-eslint', '@typescript-eslint/tslint', 'import'],
rules: {
'@typescript-eslint/adjacent-overload-signatures': 'error',
'@typescript-eslint/array-type': ['error', { default: 'generic' }],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-types': 'error',
'@typescript-eslint/class-name-casing': 'error',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
overrides: {
constructors: 'off',
},
},
],
'@typescript-eslint/indent': ['off'],
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-object-literal-type-assertion': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-this-alias': 'error',
'@typescript-eslint/no-triple-slash-reference': 'off',
'@typescript-eslint/no-use-before-declare': 'off',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-function-type': 'error',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/prefer-namespace-keyword': 'error',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unified-signatures': 'error',
'arrow-body-style': 'error',
'arrow-parens': ['error', 'always'],
complexity: 'off',
'constructor-super': 'error',
curly: 'error',
'default-case': 'error',
'dot-notation': 'error',
'eol-last': 'error',
'guard-for-in': 'error',
'import/first': 'error',
/**'import/order': [
'error',
{
groups: [['builtin', 'external'], 'internal', 'parent', ['sibling', 'index']],
'newlines-between': 'always',
},
],*/
'max-classes-per-file': ['error', 1],
'new-parens': 'error',
'no-bitwise': 'off',
'no-caller': 'error',
'no-cond-assign': 'error',
'no-console': 'error',
'no-debugger': 'error',
'no-duplicate-case': 'error',
'no-empty': 'error',
'no-empty-function': 'error',
'no-extra-bind': 'error',
'no-fallthrough': 'error',
'no-invalid-this': 'off',
'no-irregular-whitespace': 'error',
'no-magic-numbers': ['error', { ignoreArrayIndexes: true, ignore: [-1, 0, 1] }],
'no-multiple-empty-lines': [
'error',
{
max: 1,
},
],
'no-new-func': 'error',
'no-new-wrappers': 'error',
'no-return-await': 'error',
'no-sequences': 'error',
'no-sparse-arrays': 'error',
'no-template-curly-in-string': 'error',
'no-throw-literal': 'error',
'no-undef-init': 'error',
'no-unsafe-finally': 'error',
'no-unused-labels': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'one-var': 'off',
'prefer-const': [
'error',
{
destructuring: 'all',
},
],
'prefer-object-spread': 'error',
'prefer-template': 'error',
'quote-props': ['error', 'as-needed'],
radix: 'error',
'space-before-function-paren': [
'error',
{
anonymous: 'never',
asyncArrow: 'always',
named: 'never',
},
],
'use-isnan': 'error',
'valid-typeof': 'off',
yoda: 'error',
'@typescript-eslint/tslint/config': [
'error',
{
rulesDirectory: ['./node_modules/tslint-react/rules'],
rules: {
align: [true, 'parameters', 'statements', 'members'],
deprecation: true,
encoding: true,
'import-spacing': true,
'jsdoc-format': [true, 'check-multiline-start'],
'jsx-boolean-value': true,
'jsx-curly-spacing': [true, 'never'],
'jsx-equals-spacing': [true, 'never'],
'jsx-key': true,
'jsx-no-bind': true,
'jsx-no-lambda': true,
'jsx-no-string-ref': true,
'jsx-self-close': true,
'max-line-length': [true, 100],
'newline-before-return': true,
'no-duplicate-imports': true,
'no-duplicate-variable': true,
'no-reference-import': true,
'no-shadowed-variable': true,
'no-trailing-whitespace': true,
'no-unused-expression': true,
'object-literal-sort-keys': true,
'one-line': [
true,
'check-catch',
'check-else',
'check-finally',
'check-open-brace',
'check-whitespace',
],
'only-arrow-functions': [true, 'allow-declarations', 'allow-named-functions'],
'prefer-method-signature': true,
quotemark: [true, 'single', 'jsx-double', 'avoid-escape'],
semicolon: [true, 'always', 'ignore-bound-class-methods'],
'space-within-parens': [true, 0],
'switch-final-break': true,
'trailing-comma': [
true,
{
multiline: 'always',
singleline: 'never',
esSpecCompliant: true,
},
],
'triple-equals': true,
'variable-name': [
true,
'ban-keywords',
'check-format',
'allow-pascal-case',
'allow-leading-underscore',
],
whitespace: [
true,
'check-branch',
'check-decl',
'check-operator',
'check-module',
'check-separator',
'check-rest-spread',
'check-type',
'check-typecast',
'check-type-operator',
'check-preblock',
],
},
},
],
},
};