@mikey-pro/eslint-config 4.6.2 → 4.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +56 -70
- package/package.json +9 -8
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ module.exports = {
|
|
|
11
11
|
],
|
|
12
12
|
overrides: [
|
|
13
13
|
{
|
|
14
|
-
files: ['*.ts'],
|
|
14
|
+
files: ['*.ts', '*.tsx'],
|
|
15
15
|
parser: '@typescript-eslint/parser',
|
|
16
16
|
parserOptions: {
|
|
17
17
|
tsconfigRootDir: __dirname,
|
|
@@ -29,29 +29,13 @@ module.exports = {
|
|
|
29
29
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
30
30
|
],
|
|
31
31
|
rules: {
|
|
32
|
-
'import/named':
|
|
33
|
-
'import/namespace':
|
|
34
|
-
'import/default':
|
|
35
|
-
'import/no-named-as-default-member':
|
|
36
|
-
'import/no-unresolved':
|
|
37
|
-
'@typescript-eslint/indent':
|
|
38
|
-
'@typescript-eslint/naming-convention':
|
|
39
|
-
'prettier/prettier': [1, { parser: 'typescript' }],
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
files: ['*.tsx', '*.jsx'],
|
|
44
|
-
parserOptions: {
|
|
45
|
-
extraFileExtensions: ['.vue', '.svelte'],
|
|
46
|
-
},
|
|
47
|
-
rules: {
|
|
48
|
-
'import/named': 0,
|
|
49
|
-
'import/namespace': 0,
|
|
50
|
-
'import/default': 0,
|
|
51
|
-
'import/no-named-as-default-member': 0,
|
|
52
|
-
'import/no-unresolved': 0,
|
|
53
|
-
'@typescript-eslint/naming-convention': 0,
|
|
54
|
-
'@typescript-eslint/indent': 0,
|
|
32
|
+
'import/named': 1,
|
|
33
|
+
'import/namespace': 1,
|
|
34
|
+
'import/default': 1,
|
|
35
|
+
'import/no-named-as-default-member': 1,
|
|
36
|
+
'import/no-unresolved': 1,
|
|
37
|
+
'@typescript-eslint/indent': 1,
|
|
38
|
+
'@typescript-eslint/naming-convention': 1,
|
|
55
39
|
'prettier/prettier': [1, { parser: 'typescript' }],
|
|
56
40
|
},
|
|
57
41
|
},
|
|
@@ -86,7 +70,7 @@ module.exports = {
|
|
|
86
70
|
parser: 'toml-eslint-parser',
|
|
87
71
|
extends: ['plugin:toml/standard'],
|
|
88
72
|
rules: {
|
|
89
|
-
'prettier/prettier':
|
|
73
|
+
'prettier/prettier': 1,
|
|
90
74
|
},
|
|
91
75
|
},
|
|
92
76
|
{
|
|
@@ -118,10 +102,10 @@ module.exports = {
|
|
|
118
102
|
extends: ['plugin:@html-eslint/recommended'],
|
|
119
103
|
plugins: ['@html-eslint'],
|
|
120
104
|
rules: {
|
|
121
|
-
'spaced-comment':
|
|
122
|
-
'@html-eslint/indent':
|
|
123
|
-
'@html-eslint/no-extra-spacing-attrs':
|
|
124
|
-
'@html-eslint/require-closing-tags':
|
|
105
|
+
'spaced-comment': 1,
|
|
106
|
+
'@html-eslint/indent': 1,
|
|
107
|
+
'@html-eslint/no-extra-spacing-attrs': 1,
|
|
108
|
+
'@html-eslint/require-closing-tags': 1,
|
|
125
109
|
'disable-autofix/@html-eslint/require-closing-tags': [
|
|
126
110
|
1,
|
|
127
111
|
{ selfClosing: 'always' },
|
|
@@ -179,7 +163,7 @@ module.exports = {
|
|
|
179
163
|
order: [['script', 'template'], 'style'],
|
|
180
164
|
},
|
|
181
165
|
],
|
|
182
|
-
'prettier/prettier':
|
|
166
|
+
'prettier/prettier': 1,
|
|
183
167
|
},
|
|
184
168
|
},
|
|
185
169
|
{
|
|
@@ -187,35 +171,27 @@ module.exports = {
|
|
|
187
171
|
processor: 'svelte3/svelte3',
|
|
188
172
|
plugins: ['svelte3'],
|
|
189
173
|
rules: {
|
|
190
|
-
'import/first':
|
|
191
|
-
'import/no-duplicates':
|
|
192
|
-
'import/no-mutable-exports':
|
|
193
|
-
'import/no-unresolved':
|
|
194
|
-
'prettier/prettier':
|
|
174
|
+
'import/first': 1,
|
|
175
|
+
'import/no-duplicates': 1,
|
|
176
|
+
'import/no-mutable-exports': 1,
|
|
177
|
+
'import/no-unresolved': 1,
|
|
178
|
+
'prettier/prettier': 1,
|
|
195
179
|
},
|
|
196
180
|
},
|
|
197
181
|
{
|
|
198
182
|
files: ['*.json', '*.jsonc', '*rc'],
|
|
199
|
-
extends: ['plugin:jsonc/
|
|
183
|
+
extends: ['plugin:jsonc/recommended-with-json'],
|
|
200
184
|
parser: 'jsonc-eslint-parser',
|
|
201
185
|
plugins: ['json-format'],
|
|
202
186
|
rules: {
|
|
203
|
-
'jsonc/sort-array-values': [
|
|
204
|
-
1,
|
|
205
|
-
{ pathPattern: '.*', order: { type: 'asc' } },
|
|
206
|
-
],
|
|
207
187
|
'prettier/prettier': [1, { parser: 'json' }],
|
|
208
188
|
},
|
|
209
189
|
},
|
|
210
190
|
{
|
|
211
191
|
files: ['*.json5'],
|
|
212
|
-
extends: ['plugin:jsonc/
|
|
192
|
+
extends: ['plugin:jsonc/recommended-with-json5'],
|
|
213
193
|
parser: 'jsonc-eslint-parser',
|
|
214
194
|
rules: {
|
|
215
|
-
'jsonc/sort-array-values': [
|
|
216
|
-
1,
|
|
217
|
-
{ pathPattern: '.*', order: { type: 'asc' } },
|
|
218
|
-
],
|
|
219
195
|
'prettier/prettier': [1, { parser: 'json5' }],
|
|
220
196
|
},
|
|
221
197
|
},
|
|
@@ -225,7 +201,7 @@ module.exports = {
|
|
|
225
201
|
node: true,
|
|
226
202
|
es6: true,
|
|
227
203
|
commonjs: true,
|
|
228
|
-
|
|
204
|
+
es2121: true,
|
|
229
205
|
},
|
|
230
206
|
rules: {
|
|
231
207
|
'no-restricted-syntax': [
|
|
@@ -246,12 +222,12 @@ module.exports = {
|
|
|
246
222
|
'`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',
|
|
247
223
|
},
|
|
248
224
|
],
|
|
249
|
-
camelcase:
|
|
250
|
-
'no-console':
|
|
251
|
-
'func-names':
|
|
252
|
-
'no-process-exit':
|
|
253
|
-
'class-methods-use-this':
|
|
254
|
-
'no-underscore-dangle':
|
|
225
|
+
camelcase: 1,
|
|
226
|
+
'no-console': 1,
|
|
227
|
+
'func-names': 1,
|
|
228
|
+
'no-process-exit': 1,
|
|
229
|
+
'class-methods-use-this': 1,
|
|
230
|
+
'no-underscore-dangle': 1,
|
|
255
231
|
'import/no-unresolved': [
|
|
256
232
|
1,
|
|
257
233
|
{ commonjs: true, amd: true, ignore: ['^node:'] },
|
|
@@ -274,9 +250,9 @@ module.exports = {
|
|
|
274
250
|
},
|
|
275
251
|
],
|
|
276
252
|
'keyword-spacing': 1,
|
|
277
|
-
'require-atomic-updates':
|
|
278
|
-
'import/no-commonjs':
|
|
279
|
-
'sort-imports':
|
|
253
|
+
'require-atomic-updates': 1,
|
|
254
|
+
'import/no-commonjs': 1,
|
|
255
|
+
'sort-imports': 1,
|
|
280
256
|
'constructor-super': 1,
|
|
281
257
|
'no-caller': 1,
|
|
282
258
|
'no-const-assign': 1,
|
|
@@ -285,9 +261,9 @@ module.exports = {
|
|
|
285
261
|
'no-dupe-keys': 1,
|
|
286
262
|
'no-duplicate-imports': 1,
|
|
287
263
|
'no-else-return': 1,
|
|
288
|
-
'no-empty-pattern':
|
|
289
|
-
'no-empty':
|
|
290
|
-
'no-extra-parens':
|
|
264
|
+
'no-empty-pattern': 1,
|
|
265
|
+
'no-empty': 1,
|
|
266
|
+
'no-extra-parens': 1,
|
|
291
267
|
'no-iterator': 1,
|
|
292
268
|
'no-lonely-if': 1,
|
|
293
269
|
'no-mixed-spaces-and-tabs': [1, 'smart-tabs'],
|
|
@@ -296,7 +272,7 @@ module.exports = {
|
|
|
296
272
|
'no-proto': 1,
|
|
297
273
|
'no-redeclare': 1,
|
|
298
274
|
'no-shadow-restricted-names': 1,
|
|
299
|
-
'no-shadow':
|
|
275
|
+
'no-shadow': 1,
|
|
300
276
|
'no-spaced-func': 1,
|
|
301
277
|
'no-this-before-super': 1,
|
|
302
278
|
'no-undef-init': 1,
|
|
@@ -316,19 +292,19 @@ module.exports = {
|
|
|
316
292
|
'no-useless-rename': 1,
|
|
317
293
|
'no-var': 1,
|
|
318
294
|
'no-with': 1,
|
|
319
|
-
semi:
|
|
295
|
+
semi: 1,
|
|
320
296
|
strict: [1, 'never'],
|
|
321
|
-
'object-curly-spacing': [
|
|
322
|
-
'rest-spread-spacing':
|
|
323
|
-
'space-before-function-paren': [
|
|
324
|
-
'space-in-parens': [
|
|
297
|
+
'object-curly-spacing': [1, 'always'],
|
|
298
|
+
'rest-spread-spacing': 1,
|
|
299
|
+
'space-before-function-paren': [1, 'always'],
|
|
300
|
+
'space-in-parens': [1, 'never'],
|
|
325
301
|
'object-shorthand': 1,
|
|
326
302
|
'prefer-arrow-callback': 1,
|
|
327
303
|
'prefer-rest-params': 1,
|
|
328
304
|
'prefer-spread': 1,
|
|
329
305
|
'prefer-template': 1,
|
|
330
306
|
quotes: [
|
|
331
|
-
|
|
307
|
+
1,
|
|
332
308
|
'single',
|
|
333
309
|
{
|
|
334
310
|
avoidEscape: true,
|
|
@@ -338,7 +314,7 @@ module.exports = {
|
|
|
338
314
|
'quote-props': [1, 'as-needed'],
|
|
339
315
|
radix: 1,
|
|
340
316
|
'unicode-bom': 1,
|
|
341
|
-
'valid-jsdoc':
|
|
317
|
+
'valid-jsdoc': 1,
|
|
342
318
|
'spaced-comment': [
|
|
343
319
|
1,
|
|
344
320
|
'always',
|
|
@@ -355,7 +331,7 @@ module.exports = {
|
|
|
355
331
|
},
|
|
356
332
|
],
|
|
357
333
|
'unicorn/import-index': [1, { ignoreImports: true }],
|
|
358
|
-
'filenames/match-regex':
|
|
334
|
+
'filenames/match-regex': 1,
|
|
359
335
|
'unicorn/filename-case': [
|
|
360
336
|
1,
|
|
361
337
|
{
|
|
@@ -366,9 +342,9 @@ module.exports = {
|
|
|
366
342
|
ignore: ['README.md'],
|
|
367
343
|
},
|
|
368
344
|
],
|
|
369
|
-
'react/state-in-constructor':
|
|
345
|
+
'react/state-in-constructor': 1,
|
|
370
346
|
'react/no-deprecated': 1,
|
|
371
|
-
'react/react-in-jsx-scope':
|
|
347
|
+
'react/react-in-jsx-scope': 1,
|
|
372
348
|
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
373
349
|
'react/jsx-no-bind': [
|
|
374
350
|
1,
|
|
@@ -385,7 +361,7 @@ module.exports = {
|
|
|
385
361
|
'react/jsx-no-undef': 1,
|
|
386
362
|
'react/jsx-uses-react': 1,
|
|
387
363
|
'react/jsx-uses-vars': 1,
|
|
388
|
-
'react/function-component-definition':
|
|
364
|
+
'react/function-component-definition': 1,
|
|
389
365
|
'react/jsx-no-duplicate-props': 1,
|
|
390
366
|
'react/jsx-no-target-blank': 1,
|
|
391
367
|
'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
|
|
@@ -406,7 +382,16 @@ module.exports = {
|
|
|
406
382
|
html: false,
|
|
407
383
|
},
|
|
408
384
|
],
|
|
385
|
+
'sort-keys-fix/sort-keys-fix': 1,
|
|
386
|
+
'sort-vars': 1,
|
|
387
|
+
'no-confusing-arrow': 1,
|
|
388
|
+
'no-extra-bind': 1,
|
|
389
|
+
'no-extra-semi': 1,
|
|
390
|
+
'no-floating-decimal': 1,
|
|
391
|
+
'no-useless-return': 1,
|
|
392
|
+
'dot-notation': 1,
|
|
409
393
|
'prettier/prettier': [1, { parser: 'babel' }],
|
|
394
|
+
'jsx-quotes': 1,
|
|
410
395
|
},
|
|
411
396
|
plugins: [
|
|
412
397
|
'prettier',
|
|
@@ -416,6 +401,7 @@ module.exports = {
|
|
|
416
401
|
'unicorn',
|
|
417
402
|
'sonarjs',
|
|
418
403
|
'only-warn',
|
|
404
|
+
'sort-keys-fix',
|
|
419
405
|
],
|
|
420
406
|
ignorePatterns: [
|
|
421
407
|
'!.*',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikey-pro/eslint-config",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "Mikey Pro ESLint configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
"@babel/preset-env": "^7.16",
|
|
12
12
|
"@html-eslint/eslint-plugin": "^0.13.1",
|
|
13
13
|
"@html-eslint/parser": "^0.13.1",
|
|
14
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
15
|
-
"@typescript-eslint/parser": "^5.
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
15
|
+
"@typescript-eslint/parser": "^5.13.0",
|
|
16
16
|
"@vue/babel-plugin-jsx": "^1.1.1",
|
|
17
|
-
"eslint-config-prettier": "^8.
|
|
17
|
+
"eslint-config-prettier": "^8.4",
|
|
18
18
|
"eslint-config-react-app": "^7.0.0",
|
|
19
19
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
20
20
|
"eslint-plugin-compat": "^4.0",
|
|
@@ -27,13 +27,14 @@
|
|
|
27
27
|
"eslint-plugin-only-warn": "^1.0.3",
|
|
28
28
|
"eslint-plugin-prettier": "^4.0",
|
|
29
29
|
"eslint-plugin-promise": "^6.0.0",
|
|
30
|
-
"eslint-plugin-sonarjs": "^0.
|
|
31
|
-
"eslint-plugin-
|
|
30
|
+
"eslint-plugin-sonarjs": "^0.12.0",
|
|
31
|
+
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
32
|
+
"eslint-plugin-svelte3": "^3.4.1",
|
|
32
33
|
"eslint-plugin-toml": "^0.3.0",
|
|
33
34
|
"eslint-plugin-unicorn": "^41.0.0",
|
|
34
|
-
"eslint-plugin-vue": "^8.
|
|
35
|
+
"eslint-plugin-vue": "^8.5",
|
|
35
36
|
"eslint-plugin-yaml": "^0.5.0",
|
|
36
|
-
"vue-eslint-parser": "^8.
|
|
37
|
+
"vue-eslint-parser": "^8.3"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"eslint": ">=8.3.0"
|