/
.eslintrc.js
269 lines (269 loc) · 7.24 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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
module.exports = {
'parser': 'babel-eslint',
'env': {
'browser': true,
'es6': true,
'jquery': true,
'node': true,
'mocha': true
},
'extends': 'eslint:recommended',
'plugins': ['import'],
'parserOptions': {
'sourceType': 'module'
},
'globals': {
'dicomParser': true,
'jpeg': true,
'JpegImage': true,
'OpenJPEG': true,
'JpxImage': true,
'CharLS': true,
'pako': true
},
'rules': {
'no-constant-condition': 'off',
'accessor-pairs': 'warn',
'array-bracket-spacing': 'warn',
'array-callback-return': 'warn',
'arrow-body-style': 'warn',
'arrow-parens': 'warn',
'arrow-spacing': 'warn',
'block-scoped-var': 'warn',
'block-spacing': 'warn',
'brace-style': 'warn',
'callback-return': 'warn',
'camelcase': 'warn',
'capitalized-comments': 'off',
'class-methods-use-this': 'warn',
'comma-dangle': 'warn',
'comma-spacing': [
'warn',
{
'after': true,
'before': false
}
],
'comma-style': 'warn',
'complexity': 'warn',
'computed-property-spacing': 'warn',
'consistent-return': 'warn',
'consistent-this': 'warn',
'curly': 'warn',
'default-case': 'warn',
'dot-location': 'warn',
'dot-notation': 'warn',
'eol-last': 'warn',
'eqeqeq': 'warn',
'func-call-spacing': 'warn',
'func-name-matching': 'warn',
'func-names': [
'warn',
'never'
],
'func-style': 'warn',
'generator-star-spacing': 'warn',
'global-require': 'warn',
'guard-for-in': 'warn',
'handle-callback-err': 'warn',
'id-blacklist': 'warn',
'id-length': 'off',
'id-match': 'warn',
'indent': ['warn', 2],
//'init-declarations': 'warn',
'import/default': 'warn',
'import/export': 'warn',
'import/extensions': ['warn', { "js": "always" }],
'import/first': 'warn',
'import/named': 'warn',
'import/namespace': 'warn',
'import/newline-after-import': 'warn',
'import/no-unresolved': 'warn',
'import/no-webpack-loader-syntax': 'warn',
'jsx-quotes': 'warn',
'key-spacing': 'warn',
'keyword-spacing': [
'warn',
{
'after': true,
'before': true
}
],
'line-comment-position': 'warn',
'linebreak-style': [
'warn',
'unix'
],
'lines-around-comment': 'warn',
'lines-around-directive': 'warn',
'max-depth': 'warn',
'max-len': ['warn', {
'code': 120,
'tabWidth': 2,
'comments': 120,
'ignoreComments': false,
'ignoreTrailingComments': true,
'ignoreUrls': true,
'ignoreTemplateLiterals': false,
'ignoreRegExpLiterals': true
}],
'max-lines': 'warn',
'max-nested-callbacks': 'warn',
'max-params': 'warn',
'max-statements': ['warn', 40],
'max-statements-per-line': 'warn',
'multiline-ternary': 'off',
'new-cap': 'warn',
'new-parens': 'warn',
'newline-after-var': 'warn',
'newline-before-return': 'warn',
'newline-per-chained-call': 'warn',
'no-alert': 'warn',
'no-array-constructor': 'warn',
'no-bitwise': 'off',
'no-caller': 'warn',
'no-catch-shadow': 'warn',
'no-confusing-arrow': 'warn',
'no-console': 'off',
'no-continue': 'warn',
'no-div-regex': 'warn',
'no-duplicate-imports': 'warn',
'no-else-return': 'warn',
'no-empty-function': 'off',
'no-eq-null': 'warn',
'no-eval': 'warn',
'no-extend-native': 'warn',
'no-extra-bind': 'warn',
'no-extra-label': 'warn',
'no-extra-parens': 'off',
'no-floating-decimal': 'warn',
'no-implicit-coercion': 'warn',
'no-implicit-globals': 'warn',
'no-implied-eval': 'warn',
'no-inline-comments': 'warn',
'no-invalid-this': 'off',
'no-iterator': 'warn',
'no-label-var': 'warn',
'no-labels': 'warn',
'no-lone-blocks': 'warn',
'no-lonely-if': 'warn',
'no-loop-func': 'warn',
'no-magic-numbers': 'off',
'no-mixed-operators': 'warn',
'no-mixed-requires': 'warn',
'no-multi-spaces': 'warn',
'no-multi-str': 'warn',
'no-multiple-empty-lines': 'warn',
'no-native-reassign': 'warn',
'no-negated-condition': 'warn',
'no-negated-in-lhs': 'warn',
'no-nested-ternary': 'warn',
'no-new': 'warn',
'no-new-func': 'warn',
'no-new-object': 'warn',
'no-new-require': 'warn',
'no-new-wrappers': 'warn',
'no-octal-escape': 'warn',
'no-param-reassign': 'warn',
'no-path-concat': 'warn',
'no-plusplus': 'off',
'no-process-env': 'warn',
'no-process-exit': 'warn',
'no-proto': 'warn',
'no-prototype-builtins': 'warn',
'no-restricted-globals': 'warn',
'no-restricted-imports': 'warn',
'no-restricted-modules': 'warn',
'no-restricted-properties': 'warn',
'no-restricted-syntax': 'warn',
'no-return-assign': 'warn',
'no-return-await': 'warn',
'no-script-url': 'warn',
'no-self-compare': 'warn',
'no-sequences': 'warn',
'no-shadow': 'warn',
'no-shadow-restricted-names': 'warn',
'no-spaced-func': 'warn',
'no-sync': 'warn',
'no-tabs': 'warn',
'no-template-curly-in-string': 'warn',
'no-ternary': 'off',
'no-throw-literal': 'warn',
'no-trailing-spaces': 'warn',
'no-undef': 'error',
'no-undef-init': 'warn',
'no-undefined': 'off',
'no-unused-vars': 'warn',
'no-underscore-dangle': 'warn',
'no-unmodified-loop-condition': 'warn',
'no-unneeded-ternary': 'warn',
'no-unused-expressions': 'warn',
'no-use-before-define': 'warn',
'no-useless-call': 'warn',
'no-useless-computed-key': 'warn',
'no-useless-concat': 'warn',
'no-useless-constructor': 'warn',
'no-useless-escape': 'warn',
'no-useless-rename': 'warn',
'no-useless-return': 'warn',
'no-var': 'off',
'no-void': 'off',
'no-warning-comments': 'warn',
'no-whitespace-before-property': 'warn',
'no-with': 'warn',
'object-curly-spacing': [
'warn',
'always'
],
'object-property-newline': 'warn',
'object-shorthand': 'warn',
'one-var': 'off',
'one-var-declaration-per-line': 'warn',
'operator-assignment': 'warn',
'operator-linebreak': 'warn',
'padded-blocks': ['warn', 'never'],
'prefer-arrow-callback': 'off',
'prefer-const': 'warn',
'prefer-numeric-literals': 'warn',
'prefer-reflect': 'warn',
'prefer-rest-params': 'warn',
'prefer-spread': 'warn',
'prefer-template': 'warn',
'quote-props': ['warn', 'as-needed'],
'quotes': [
'warn',
'single'
],
'radix': 'warn',
'require-await': 'warn',
//'require-jsdoc': 'warn',
'rest-spread-spacing': 'warn',
'semi': 'warn',
'semi-spacing': 'warn',
'sort-imports': 'off',
'sort-keys': 'off',
'sort-vars': 'off',
'space-before-blocks': 'warn',
'space-before-function-paren': 'warn',
'space-in-parens': [
'warn',
'never'
],
'space-infix-ops': 'warn',
'space-unary-ops': 'warn',
'spaced-comment': 'warn',
'strict': 'warn',
'symbol-description': 'warn',
'template-curly-spacing': 'warn',
'unicode-bom': [
'warn',
'never'
],
//'valid-jsdoc': 'warn',
'vars-on-top': 'warn',
'wrap-iife': ['warn', 'inside'],
'wrap-regex': 'warn',
'yield-star-spacing': 'warn',
'yoda': 'warn'
}
};