@mikey-pro/eslint-config 4.1.1 → 4.3.1
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 +86 -86
- package/package.json +2 -6
package/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
extends: [
|
|
3
|
-
'react-app',
|
|
4
|
-
'react-app/jest',
|
|
5
3
|
'eslint:recommended',
|
|
6
4
|
'plugin:unicorn/all',
|
|
7
5
|
'plugin:sonarjs/recommended',
|
|
@@ -23,11 +21,12 @@ module.exports = {
|
|
|
23
21
|
'import/no-unresolved': 0,
|
|
24
22
|
'@typescript-eslint/indent': 0,
|
|
25
23
|
'@typescript-eslint/naming-convention': 0,
|
|
26
|
-
'prettier/prettier': [
|
|
24
|
+
'prettier/prettier': [1, { parser: 'typescript' }],
|
|
27
25
|
},
|
|
28
26
|
},
|
|
29
27
|
{
|
|
30
28
|
files: ['*.tsx'],
|
|
29
|
+
extends: ['react-app', 'react-app/jest'],
|
|
31
30
|
parserOptions: {
|
|
32
31
|
extraFileExtensions: ['.vue', '.svelte'],
|
|
33
32
|
},
|
|
@@ -40,7 +39,7 @@ module.exports = {
|
|
|
40
39
|
'@typescript-eslint/naming-convention': 0,
|
|
41
40
|
'@typescript-eslint/indent': 0,
|
|
42
41
|
'react/state-in-constructor': 0,
|
|
43
|
-
'react/no-deprecated':
|
|
42
|
+
'react/no-deprecated': 1,
|
|
44
43
|
'react/react-in-jsx-scope': 0,
|
|
45
44
|
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
46
45
|
'react/jsx-no-bind': [
|
|
@@ -51,47 +50,47 @@ module.exports = {
|
|
|
51
50
|
allowArrowFunctions: true,
|
|
52
51
|
},
|
|
53
52
|
],
|
|
54
|
-
'react/no-string-refs':
|
|
55
|
-
'react/no-find-dom-node':
|
|
56
|
-
'react/jsx-no-comment-textnodes':
|
|
57
|
-
'react/jsx-curly-spacing':
|
|
58
|
-
'react/jsx-no-undef':
|
|
59
|
-
'react/jsx-uses-react':
|
|
60
|
-
'react/jsx-uses-vars':
|
|
53
|
+
'react/no-string-refs': 1,
|
|
54
|
+
'react/no-find-dom-node': 1,
|
|
55
|
+
'react/jsx-no-comment-textnodes': 1,
|
|
56
|
+
'react/jsx-curly-spacing': 1,
|
|
57
|
+
'react/jsx-no-undef': 1,
|
|
58
|
+
'react/jsx-uses-react': 1,
|
|
59
|
+
'react/jsx-uses-vars': 1,
|
|
61
60
|
'react/function-component-definition': 0,
|
|
62
|
-
'react/jsx-no-duplicate-props':
|
|
63
|
-
'react/jsx-no-target-blank':
|
|
64
|
-
'react/jsx-tag-spacing': [
|
|
65
|
-
'react/jsx-key': [
|
|
66
|
-
'react/self-closing-comp':
|
|
67
|
-
'react/prefer-es6-class':
|
|
61
|
+
'react/jsx-no-duplicate-props': 1,
|
|
62
|
+
'react/jsx-no-target-blank': 1,
|
|
63
|
+
'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
|
|
64
|
+
'react/jsx-key': [1, { checkFragmentShorthand: true }],
|
|
65
|
+
'react/self-closing-comp': 1,
|
|
66
|
+
'react/prefer-es6-class': 1,
|
|
68
67
|
'react/prefer-stateless-function': 1,
|
|
69
|
-
'react/require-render-return':
|
|
68
|
+
'react/require-render-return': 1,
|
|
70
69
|
'react/no-danger': 1,
|
|
71
|
-
'react/no-did-mount-set-state':
|
|
72
|
-
'react/no-did-update-set-state':
|
|
73
|
-
'react/no-is-mounted':
|
|
74
|
-
'react-hooks/rules-of-hooks':
|
|
70
|
+
'react/no-did-mount-set-state': 1,
|
|
71
|
+
'react/no-did-update-set-state': 1,
|
|
72
|
+
'react/no-is-mounted': 1,
|
|
73
|
+
'react-hooks/rules-of-hooks': 1,
|
|
75
74
|
'react-hooks/exhaustive-deps': 1,
|
|
76
|
-
'prettier/prettier': [
|
|
75
|
+
'prettier/prettier': [1, { parser: 'typescript' }],
|
|
77
76
|
},
|
|
78
77
|
},
|
|
79
78
|
{
|
|
80
79
|
files: ['*.css'],
|
|
81
80
|
rules: {
|
|
82
|
-
'prettier/prettier': [
|
|
81
|
+
'prettier/prettier': [1, { parser: 'css' }],
|
|
83
82
|
},
|
|
84
83
|
},
|
|
85
84
|
{
|
|
86
85
|
files: ['*.scss'],
|
|
87
86
|
rules: {
|
|
88
|
-
'prettier/prettier': [
|
|
87
|
+
'prettier/prettier': [1, { parser: 'scss' }],
|
|
89
88
|
},
|
|
90
89
|
},
|
|
91
90
|
{
|
|
92
91
|
files: ['*.less'],
|
|
93
92
|
rules: {
|
|
94
|
-
'prettier/prettier': [
|
|
93
|
+
'prettier/prettier': [1, { parser: 'less' }],
|
|
95
94
|
},
|
|
96
95
|
},
|
|
97
96
|
{
|
|
@@ -99,7 +98,7 @@ module.exports = {
|
|
|
99
98
|
plugins: ['yaml'],
|
|
100
99
|
extends: ['plugin:yaml/recommended'],
|
|
101
100
|
rules: {
|
|
102
|
-
'prettier/prettier': [
|
|
101
|
+
'prettier/prettier': [1, { parser: 'yaml' }],
|
|
103
102
|
},
|
|
104
103
|
},
|
|
105
104
|
{
|
|
@@ -112,6 +111,7 @@ module.exports = {
|
|
|
112
111
|
},
|
|
113
112
|
{
|
|
114
113
|
files: ['*.jsx'],
|
|
114
|
+
extends: ['react-app', 'react-app/jest'],
|
|
115
115
|
parser: '@babel/eslint-parser',
|
|
116
116
|
parserOptions: {
|
|
117
117
|
requireConfigFile: false,
|
|
@@ -132,7 +132,7 @@ module.exports = {
|
|
|
132
132
|
},
|
|
133
133
|
},
|
|
134
134
|
rules: {
|
|
135
|
-
'react/no-deprecated':
|
|
135
|
+
'react/no-deprecated': 1,
|
|
136
136
|
'react/react-in-jsx-scope': 0,
|
|
137
137
|
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
138
138
|
'react/jsx-no-bind': [
|
|
@@ -143,28 +143,28 @@ module.exports = {
|
|
|
143
143
|
allowArrowFunctions: true,
|
|
144
144
|
},
|
|
145
145
|
],
|
|
146
|
-
'react/no-string-refs':
|
|
147
|
-
'react/no-find-dom-node':
|
|
148
|
-
'react/jsx-no-comment-textnodes':
|
|
149
|
-
'react/jsx-curly-spacing':
|
|
150
|
-
'react/jsx-no-undef':
|
|
151
|
-
'react/jsx-uses-react':
|
|
152
|
-
'react/jsx-uses-vars':
|
|
146
|
+
'react/no-string-refs': 1,
|
|
147
|
+
'react/no-find-dom-node': 1,
|
|
148
|
+
'react/jsx-no-comment-textnodes': 1,
|
|
149
|
+
'react/jsx-curly-spacing': 1,
|
|
150
|
+
'react/jsx-no-undef': 1,
|
|
151
|
+
'react/jsx-uses-react': 1,
|
|
152
|
+
'react/jsx-uses-vars': 1,
|
|
153
153
|
'react/function-component-definition': 0,
|
|
154
154
|
'react/state-in-constructor': 0,
|
|
155
|
-
'react/jsx-no-duplicate-props':
|
|
156
|
-
'react/jsx-no-target-blank':
|
|
157
|
-
'react/jsx-tag-spacing': [
|
|
158
|
-
'react/jsx-key': [
|
|
159
|
-
'react/self-closing-comp':
|
|
160
|
-
'react/prefer-es6-class':
|
|
155
|
+
'react/jsx-no-duplicate-props': 1,
|
|
156
|
+
'react/jsx-no-target-blank': 1,
|
|
157
|
+
'react/jsx-tag-spacing': [1, { beforeSelfClosing: 'always' }],
|
|
158
|
+
'react/jsx-key': [1, { checkFragmentShorthand: true }],
|
|
159
|
+
'react/self-closing-comp': 1,
|
|
160
|
+
'react/prefer-es6-class': 1,
|
|
161
161
|
'react/prefer-stateless-function': 1,
|
|
162
|
-
'react/require-render-return':
|
|
162
|
+
'react/require-render-return': 1,
|
|
163
163
|
'react/no-danger': 1,
|
|
164
|
-
'react/no-did-mount-set-state':
|
|
165
|
-
'react/no-did-update-set-state':
|
|
166
|
-
'react/no-is-mounted':
|
|
167
|
-
'react-hooks/rules-of-hooks':
|
|
164
|
+
'react/no-did-mount-set-state': 1,
|
|
165
|
+
'react/no-did-update-set-state': 1,
|
|
166
|
+
'react/no-is-mounted': 1,
|
|
167
|
+
'react-hooks/rules-of-hooks': 1,
|
|
168
168
|
'react-hooks/exhaustive-deps': 1,
|
|
169
169
|
},
|
|
170
170
|
},
|
|
@@ -174,7 +174,7 @@ module.exports = {
|
|
|
174
174
|
extends: ['plugin:md/recommended'],
|
|
175
175
|
rules: {
|
|
176
176
|
'md/remark': [
|
|
177
|
-
|
|
177
|
+
1,
|
|
178
178
|
{
|
|
179
179
|
plugins: [
|
|
180
180
|
'preset-lint-markdown-style-guide',
|
|
@@ -182,13 +182,13 @@ module.exports = {
|
|
|
182
182
|
],
|
|
183
183
|
},
|
|
184
184
|
],
|
|
185
|
-
'prettier/prettier': [
|
|
185
|
+
'prettier/prettier': [1, { parser: 'markdown' }],
|
|
186
186
|
},
|
|
187
187
|
},
|
|
188
188
|
{
|
|
189
189
|
files: ['*.md.json'],
|
|
190
190
|
rules: {
|
|
191
|
-
'prettier/prettier': [
|
|
191
|
+
'prettier/prettier': [1, { parser: 'json' }],
|
|
192
192
|
},
|
|
193
193
|
},
|
|
194
194
|
{
|
|
@@ -202,10 +202,10 @@ module.exports = {
|
|
|
202
202
|
'@html-eslint/no-extra-spacing-attrs': 0,
|
|
203
203
|
'@html-eslint/require-closing-tags': 0,
|
|
204
204
|
'disable-autofix/@html-eslint/require-closing-tags': [
|
|
205
|
-
|
|
205
|
+
1,
|
|
206
206
|
{ selfClosing: 'always' },
|
|
207
207
|
],
|
|
208
|
-
'prettier/prettier': [
|
|
208
|
+
'prettier/prettier': [1, { parser: 'html' }],
|
|
209
209
|
},
|
|
210
210
|
},
|
|
211
211
|
{
|
|
@@ -241,7 +241,7 @@ module.exports = {
|
|
|
241
241
|
},
|
|
242
242
|
rules: {
|
|
243
243
|
'vue/html-self-closing': [
|
|
244
|
-
|
|
244
|
+
1,
|
|
245
245
|
{
|
|
246
246
|
html: {
|
|
247
247
|
void: 'always',
|
|
@@ -253,7 +253,7 @@ module.exports = {
|
|
|
253
253
|
},
|
|
254
254
|
],
|
|
255
255
|
'vue/component-tags-order': [
|
|
256
|
-
|
|
256
|
+
1,
|
|
257
257
|
{
|
|
258
258
|
order: [['script', 'template'], 'style'],
|
|
259
259
|
},
|
|
@@ -279,7 +279,7 @@ module.exports = {
|
|
|
279
279
|
parser: 'jsonc-eslint-parser',
|
|
280
280
|
plugins: ['json-format'],
|
|
281
281
|
rules: {
|
|
282
|
-
'prettier/prettier': [
|
|
282
|
+
'prettier/prettier': [1, { parser: 'json' }],
|
|
283
283
|
},
|
|
284
284
|
},
|
|
285
285
|
{
|
|
@@ -287,7 +287,7 @@ module.exports = {
|
|
|
287
287
|
extends: ['plugin:jsonc/all'],
|
|
288
288
|
parser: 'jsonc-eslint-parser',
|
|
289
289
|
rules: {
|
|
290
|
-
'prettier/prettier': [
|
|
290
|
+
'prettier/prettier': [1, { parser: 'json5' }],
|
|
291
291
|
},
|
|
292
292
|
},
|
|
293
293
|
],
|
|
@@ -296,11 +296,11 @@ module.exports = {
|
|
|
296
296
|
node: true,
|
|
297
297
|
es6: true,
|
|
298
298
|
commonjs: true,
|
|
299
|
-
|
|
299
|
+
es1011: true,
|
|
300
300
|
},
|
|
301
301
|
rules: {
|
|
302
302
|
'no-restricted-syntax': [
|
|
303
|
-
|
|
303
|
+
1,
|
|
304
304
|
{
|
|
305
305
|
selector: 'ForInStatement',
|
|
306
306
|
message:
|
|
@@ -324,11 +324,11 @@ module.exports = {
|
|
|
324
324
|
'class-methods-use-this': 0,
|
|
325
325
|
'no-underscore-dangle': 0,
|
|
326
326
|
'import/no-unresolved': [
|
|
327
|
-
|
|
327
|
+
1,
|
|
328
328
|
{ commonjs: true, amd: true, ignore: ['^node:'] },
|
|
329
329
|
],
|
|
330
330
|
'import/order': [
|
|
331
|
-
|
|
331
|
+
1,
|
|
332
332
|
{
|
|
333
333
|
alphabetize: {
|
|
334
334
|
order: 'asc',
|
|
@@ -344,36 +344,36 @@ module.exports = {
|
|
|
344
344
|
array: false,
|
|
345
345
|
},
|
|
346
346
|
],
|
|
347
|
-
'keyword-spacing':
|
|
347
|
+
'keyword-spacing': 1,
|
|
348
348
|
'require-atomic-updates': 0,
|
|
349
349
|
'import/no-commonjs': 0,
|
|
350
350
|
'sort-imports': 0,
|
|
351
|
-
'constructor-super':
|
|
352
|
-
'no-caller':
|
|
353
|
-
'no-const-assign':
|
|
354
|
-
'no-delete-var':
|
|
355
|
-
'no-dupe-class-members':
|
|
356
|
-
'no-dupe-keys':
|
|
357
|
-
'no-duplicate-imports':
|
|
351
|
+
'constructor-super': 1,
|
|
352
|
+
'no-caller': 1,
|
|
353
|
+
'no-const-assign': 1,
|
|
354
|
+
'no-delete-var': 1,
|
|
355
|
+
'no-dupe-class-members': 1,
|
|
356
|
+
'no-dupe-keys': 1,
|
|
357
|
+
'no-duplicate-imports': 1,
|
|
358
358
|
'no-else-return': 1,
|
|
359
359
|
'no-empty-pattern': 0,
|
|
360
360
|
'no-empty': 0,
|
|
361
361
|
'no-extra-parens': 0,
|
|
362
|
-
'no-iterator':
|
|
363
|
-
'no-lonely-if':
|
|
362
|
+
'no-iterator': 1,
|
|
363
|
+
'no-lonely-if': 1,
|
|
364
364
|
'no-mixed-spaces-and-tabs': [1, 'smart-tabs'],
|
|
365
365
|
'no-multi-str': 1,
|
|
366
|
-
'no-new-wrappers':
|
|
367
|
-
'no-proto':
|
|
368
|
-
'no-redeclare':
|
|
369
|
-
'no-shadow-restricted-names':
|
|
366
|
+
'no-new-wrappers': 1,
|
|
367
|
+
'no-proto': 1,
|
|
368
|
+
'no-redeclare': 1,
|
|
369
|
+
'no-shadow-restricted-names': 1,
|
|
370
370
|
'no-shadow': 0,
|
|
371
|
-
'no-spaced-func':
|
|
372
|
-
'no-this-before-super':
|
|
373
|
-
'no-undef-init':
|
|
374
|
-
'no-unneeded-ternary':
|
|
371
|
+
'no-spaced-func': 1,
|
|
372
|
+
'no-this-before-super': 1,
|
|
373
|
+
'no-undef-init': 1,
|
|
374
|
+
'no-unneeded-ternary': 1,
|
|
375
375
|
'no-unused-vars': [
|
|
376
|
-
|
|
376
|
+
1,
|
|
377
377
|
{
|
|
378
378
|
args: 'after-used',
|
|
379
379
|
ignoreRestSiblings: true,
|
|
@@ -386,9 +386,9 @@ module.exports = {
|
|
|
386
386
|
'no-useless-escape': 1,
|
|
387
387
|
'no-useless-rename': 1,
|
|
388
388
|
'no-var': 1,
|
|
389
|
-
'no-with':
|
|
389
|
+
'no-with': 1,
|
|
390
390
|
semi: 0,
|
|
391
|
-
strict: [
|
|
391
|
+
strict: [1, 'never'],
|
|
392
392
|
'object-curly-spacing': [0, 'always'],
|
|
393
393
|
'rest-spread-spacing': 0,
|
|
394
394
|
'space-before-function-paren': [0, 'always'],
|
|
@@ -406,12 +406,12 @@ module.exports = {
|
|
|
406
406
|
allowTemplateLiterals: true,
|
|
407
407
|
},
|
|
408
408
|
],
|
|
409
|
-
'quote-props': [
|
|
409
|
+
'quote-props': [1, 'as-needed'],
|
|
410
410
|
radix: 1,
|
|
411
|
-
'unicode-bom':
|
|
411
|
+
'unicode-bom': 1,
|
|
412
412
|
'valid-jsdoc': 0,
|
|
413
413
|
'spaced-comment': [
|
|
414
|
-
|
|
414
|
+
1,
|
|
415
415
|
'always',
|
|
416
416
|
{
|
|
417
417
|
line: {
|
|
@@ -425,10 +425,10 @@ module.exports = {
|
|
|
425
425
|
},
|
|
426
426
|
},
|
|
427
427
|
],
|
|
428
|
-
'unicorn/import-index': [
|
|
428
|
+
'unicorn/import-index': [1, { ignoreImports: true }],
|
|
429
429
|
'filenames/match-regex': 0,
|
|
430
430
|
'unicorn/filename-case': [
|
|
431
|
-
|
|
431
|
+
1,
|
|
432
432
|
{
|
|
433
433
|
cases: {
|
|
434
434
|
camelCase: true,
|
|
@@ -437,7 +437,7 @@ module.exports = {
|
|
|
437
437
|
ignore: ['README.md'],
|
|
438
438
|
},
|
|
439
439
|
],
|
|
440
|
-
'prettier/prettier': [
|
|
440
|
+
'prettier/prettier': [1, { parser: 'babel' }],
|
|
441
441
|
},
|
|
442
442
|
plugins: [
|
|
443
443
|
'prettier',
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikey-pro/eslint-config",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "Mikey Pro ESLint configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@babel/core": "^7.16.
|
|
7
|
+
"@babel/core": "^7.16.10",
|
|
8
8
|
"@babel/eslint-parser": "^7.16",
|
|
9
9
|
"@babel/eslint-plugin": "^7.16",
|
|
10
10
|
"@babel/plugin-transform-react-jsx": "^7.16.7",
|
|
@@ -20,16 +20,12 @@
|
|
|
20
20
|
"eslint-plugin-compat": "^4.0",
|
|
21
21
|
"eslint-plugin-css-modules": "^2.11",
|
|
22
22
|
"eslint-plugin-disable-autofix": "^0.1.6",
|
|
23
|
-
"eslint-plugin-import": "^2.25",
|
|
24
23
|
"eslint-plugin-json-format": "^2.0",
|
|
25
24
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
26
|
-
"eslint-plugin-jsx-a11y": "^6.5",
|
|
27
25
|
"eslint-plugin-md": "^1.0",
|
|
28
26
|
"eslint-plugin-node": "^11.1.0",
|
|
29
27
|
"eslint-plugin-prettier": "^4.0",
|
|
30
28
|
"eslint-plugin-promise": "^6.0.0",
|
|
31
|
-
"eslint-plugin-react": "^7.28",
|
|
32
|
-
"eslint-plugin-react-hooks": "^4.3",
|
|
33
29
|
"eslint-plugin-sonarjs": "^0.11.0",
|
|
34
30
|
"eslint-plugin-svelte3": "^3.4.0",
|
|
35
31
|
"eslint-plugin-toml": "^0.3.0",
|