forked from DevExpress/DevExtreme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
234 lines (232 loc) · 10.6 KB
/
.eslintrc
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
{
"extends": ["devextreme/spell-check"],
"root": true,
"parserOptions": {
"createDefaultProgram": true,
"project": "./tsconfig.json",
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": true,
"jsx": true
}
},
"overrides": [{
"files": ["*.js"],
"parser": "babel-eslint",
"extends": ["eslint:recommended"],
"env": {
"es6": true
},
"globals": {
"setInterval": true,
"setTimeout": true,
"clearInterval": true,
"clearTimeout": true,
"require": true,
"module": true,
"exports": true
},
"rules": {
"block-spacing": "error",
"comma-spacing": "error",
"computed-property-spacing": "error",
"comma-style": ["error", "last"],
"eqeqeq": ["error", "allow-null"],
"strict": "error",
"func-call-spacing": "error",
"key-spacing": "error",
"keyword-spacing": [
"error",
{
"overrides": {
"catch": { "after": false },
"for": { "after": false },
"if": { "after": false },
"switch": { "after": false },
"while": { "after": false }
}
}
],
"no-multiple-empty-lines": [ "error", { "max": 2 } ],
"no-multi-spaces": "error",
"no-trailing-spaces": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-new-func": "error",
"no-eval": "error",
"no-undef-init": "error",
"no-unused-vars": ["error", { "args": "none", "ignoreRestSiblings": true }],
"no-extend-native": "error",
"no-alert": "error",
"no-console": "error",
"no-restricted-syntax": [ "error", "ForOfStatement" ],
"no-var": "error",
"no-whitespace-before-property": "error",
"object-curly-spacing": [ "error", "always" ],
"one-var": ["error", "never"],
"prefer-const": "error",
"semi-spacing": "error",
"semi": "error",
"space-before-blocks": "error",
"space-before-function-paren": [ "error", "never" ],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": [ "error", "always", {
"exceptions": [ "#DEBUG", "#ENDDEBUG" ],
"markers": [ "/" ]
} ],
"brace-style": [ "error", "1tbs", { "allowSingleLine": true } ],
"curly": [ "error", "multi-line", "consistent" ],
"unicode-bom": [ "error", "never" ],
"eol-last": [ "error", "always" ],
"indent": [
"error",
4,
{
"SwitchCase": 1,
"MemberExpression": 1,
"CallExpression": {
"arguments": 1
}
}
],
"quotes": ["error", "single"]
}
}, {
"files": ["*.ts?(x)"],
"parser": "@typescript-eslint/parser",
"extends": ["devextreme/typescript"],
"rules": {
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-comment": "error",
"@typescript-eslint/ban-types": "error",
"brace-style": "off",
"@typescript-eslint/brace-style": "error",
"@typescript-eslint/class-literal-property-style": "error",
"comma-spacing": "off",
"@typescript-eslint/comma-spacing": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"default-param-last": "off",
"@typescript-eslint/default-param-last": "error",
"dot-notation": "off",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"func-call-spacing": "off",
"@typescript-eslint/func-call-spacing": "error",
"indent": "off",
"@typescript-eslint/indent": "error",
"init-declarations": "off",
"keyword-spacing": "off",
"@typescript-eslint/keyword-spacing": "error",
"lines-between-class-members": "off",
"@typescript-eslint/lines-between-class-members": "error",
"@typescript-eslint/member-delimiter-style": "error",
"@typescript-eslint/method-signature-style": "error",
"@typescript-eslint/naming-convention": "error",
"no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": "error",
"no-dupe-class-members": "off",
"@typescript-eslint/no-dupe-class-members": "error",
"no-empty-function": "off",
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"no-extra-parens": "off",
"@typescript-eslint/no-extra-parens": "error",
"no-extra-semi": "off",
"@typescript-eslint/no-extra-semi": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-inferrable-types": "error",
"no-invalid-this": "off",
"no-magic-numbers": "off",
"@typescript-eslint/no-magic-numbers": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-this-alias": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-arguments": "error",
"no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": "error",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": "error",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "error",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-as-const": "error",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-reduce-type-parameter": "error",
"@typescript-eslint/prefer-regexp-exec": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/prefer-ts-expect-error": "error",
"quotes": "off",
"@typescript-eslint/quotes": "error",
"require-await": "off",
"semi": "off",
"@typescript-eslint/semi": "error",
"space-before-function-paren": "off",
"@typescript-eslint/space-before-function-paren": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/triple-slash-reference": "error",
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error"
/*
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/return-await": "error",
"no-return-await": "off",
"@typescript-eslint/no-invalid-void-type": "error",
"@typescript-eslint/no-type-alias": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-invalid-this": "error",
"@typescript-eslint/no-unused-vars-experimental": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/init-declarations": "error",
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-unsafe-return": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-unsafe-assignment": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/no-unsafe-call": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/unbound-method": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/typedef": "error",
"@typescript-eslint/no-unsafe-member-access": "error",
"@typescript-eslint/prefer-readonly-parameter-types": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/explicit-member-accessibility": "error",
"@typescript-eslint/explicit-module-boundary-types": "error",
*/
}
}, {
"files": ["./js/**/*.js"],
"rules": {
"import/no-commonjs": "error"
}
}]
}