@mikey-pro/eslint-config 3.0.0 → 3.1.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.cjs +81 -53
- package/package.json +1 -3
package/index.cjs
CHANGED
|
@@ -43,23 +43,67 @@ module.exports = {
|
|
|
43
43
|
parser: 'toml-eslint-parser',
|
|
44
44
|
extends: ['plugin:toml/standard'],
|
|
45
45
|
rules: {
|
|
46
|
-
'prettier/prettier':
|
|
46
|
+
'prettier/prettier': 0,
|
|
47
47
|
},
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
files: ['*.jsx'],
|
|
51
51
|
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
|
|
52
52
|
plugins: ['react', 'react-hooks'],
|
|
53
|
+
parser: '@babel/eslint-parser',
|
|
54
|
+
parserOptions: {
|
|
55
|
+
requireConfigFile: false,
|
|
56
|
+
ecmaVersion: 'latest',
|
|
57
|
+
sourceType: 'module',
|
|
58
|
+
babelOptions: {
|
|
59
|
+
presets: [
|
|
60
|
+
[
|
|
61
|
+
'@babel/preset-env',
|
|
62
|
+
{
|
|
63
|
+
targets: {
|
|
64
|
+
node: 'current',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
'@babel/preset-react',
|
|
69
|
+
'airbnb',
|
|
70
|
+
],
|
|
71
|
+
},
|
|
72
|
+
},
|
|
53
73
|
rules: {
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
'react/no-deprecated': 2,
|
|
75
|
+
'react/react-in-jsx-scope': 0,
|
|
76
|
+
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
77
|
+
'react/jsx-no-bind': [
|
|
78
|
+
1,
|
|
79
|
+
{
|
|
80
|
+
ignoreRefs: true,
|
|
81
|
+
allowFunctions: true,
|
|
82
|
+
allowArrowFunctions: true,
|
|
83
|
+
},
|
|
61
84
|
],
|
|
62
|
-
'
|
|
85
|
+
'react/function-component-definition': 0,
|
|
86
|
+
'react/state-in-constructor': 0,
|
|
87
|
+
'react/jsx-no-comment-textnodes': 2,
|
|
88
|
+
'react/jsx-no-duplicate-props': 2,
|
|
89
|
+
'react/jsx-no-target-blank': 2,
|
|
90
|
+
'react/jsx-no-undef': 2,
|
|
91
|
+
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
|
|
92
|
+
'react/jsx-uses-react': 2,
|
|
93
|
+
'react/jsx-uses-vars': 2,
|
|
94
|
+
'react/jsx-key': [2, { checkFragmentShorthand: true }],
|
|
95
|
+
'react/self-closing-comp': 2,
|
|
96
|
+
'react/prefer-es6-class': 2,
|
|
97
|
+
'react/prefer-stateless-function': 1,
|
|
98
|
+
'react/require-render-return': 2,
|
|
99
|
+
'react/no-danger': 1,
|
|
100
|
+
'react/no-did-mount-set-state': 2,
|
|
101
|
+
'react/no-did-update-set-state': 2,
|
|
102
|
+
'react/no-find-dom-node': 2,
|
|
103
|
+
'react/no-is-mounted': 2,
|
|
104
|
+
'react/no-string-refs': 2,
|
|
105
|
+
'react-hooks/rules-of-hooks': 2,
|
|
106
|
+
'react-hooks/exhaustive-deps': 1,
|
|
63
107
|
},
|
|
64
108
|
},
|
|
65
109
|
{
|
|
@@ -106,6 +150,34 @@ module.exports = {
|
|
|
106
150
|
files: ['*.vue'],
|
|
107
151
|
parser: 'vue-eslint-parser',
|
|
108
152
|
extends: ['plugin:vue/vue3-recommended', '@vue/airbnb'],
|
|
153
|
+
parser: '@babel/eslint-parser',
|
|
154
|
+
parserOptions: {
|
|
155
|
+
requireConfigFile: false,
|
|
156
|
+
ecmaVersion: 'latest',
|
|
157
|
+
sourceType: 'module',
|
|
158
|
+
babelOptions: {
|
|
159
|
+
presets: [
|
|
160
|
+
[
|
|
161
|
+
'@babel/preset-env',
|
|
162
|
+
{
|
|
163
|
+
targets: {
|
|
164
|
+
node: 'current',
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
],
|
|
169
|
+
plugins: [
|
|
170
|
+
'@vue/babel-plugin-jsx',
|
|
171
|
+
[
|
|
172
|
+
'@babel/plugin-transform-react-jsx',
|
|
173
|
+
{
|
|
174
|
+
pragma: 'h',
|
|
175
|
+
pragmaFrag: 'Fragment',
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
109
181
|
rules: {
|
|
110
182
|
'vue/html-self-closing': [
|
|
111
183
|
2,
|
|
@@ -281,39 +353,6 @@ module.exports = {
|
|
|
281
353
|
},
|
|
282
354
|
},
|
|
283
355
|
],
|
|
284
|
-
'react/no-deprecated': 2,
|
|
285
|
-
'react/react-in-jsx-scope': 0,
|
|
286
|
-
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
287
|
-
'react/jsx-no-bind': [
|
|
288
|
-
1,
|
|
289
|
-
{
|
|
290
|
-
ignoreRefs: true,
|
|
291
|
-
allowFunctions: true,
|
|
292
|
-
allowArrowFunctions: true,
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
'react/function-component-definition': 0,
|
|
296
|
-
'react/state-in-constructor': 0,
|
|
297
|
-
'react/jsx-no-comment-textnodes': 2,
|
|
298
|
-
'react/jsx-no-duplicate-props': 2,
|
|
299
|
-
'react/jsx-no-target-blank': 2,
|
|
300
|
-
'react/jsx-no-undef': 2,
|
|
301
|
-
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
|
|
302
|
-
'react/jsx-uses-react': 2,
|
|
303
|
-
'react/jsx-uses-vars': 2,
|
|
304
|
-
'react/jsx-key': [2, { checkFragmentShorthand: true }],
|
|
305
|
-
'react/self-closing-comp': 2,
|
|
306
|
-
'react/prefer-es6-class': 2,
|
|
307
|
-
'react/prefer-stateless-function': 1,
|
|
308
|
-
'react/require-render-return': 2,
|
|
309
|
-
'react/no-danger': 1,
|
|
310
|
-
'react/no-did-mount-set-state': 2,
|
|
311
|
-
'react/no-did-update-set-state': 2,
|
|
312
|
-
'react/no-find-dom-node': 2,
|
|
313
|
-
'react/no-is-mounted': 2,
|
|
314
|
-
'react/no-string-refs': 2,
|
|
315
|
-
'react-hooks/rules-of-hooks': 2,
|
|
316
|
-
'react-hooks/exhaustive-deps': 1,
|
|
317
356
|
'unicorn/import-index': [2, { ignoreImports: true }],
|
|
318
357
|
'filenames/match-regex': 0,
|
|
319
358
|
'unicorn/filename-case': [
|
|
@@ -367,19 +406,8 @@ module.exports = {
|
|
|
367
406
|
},
|
|
368
407
|
},
|
|
369
408
|
],
|
|
370
|
-
'@babel/preset-react',
|
|
371
409
|
'airbnb',
|
|
372
410
|
],
|
|
373
|
-
plugins: [
|
|
374
|
-
'@vue/babel-plugin-jsx',
|
|
375
|
-
[
|
|
376
|
-
'@babel/plugin-transform-react-jsx',
|
|
377
|
-
{
|
|
378
|
-
pragma: 'h',
|
|
379
|
-
pragmaFrag: 'Fragment',
|
|
380
|
-
},
|
|
381
|
-
],
|
|
382
|
-
],
|
|
383
411
|
},
|
|
384
412
|
},
|
|
385
413
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikey-pro/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Mikey Pro ESLint configuration",
|
|
5
5
|
"main": "index.cjs",
|
|
6
6
|
"dependencies": {
|
|
@@ -17,13 +17,11 @@
|
|
|
17
17
|
"eslint-config-airbnb": "^19.0",
|
|
18
18
|
"eslint-config-prettier": "^8.3",
|
|
19
19
|
"eslint-config-standard": "^16.0.3",
|
|
20
|
-
"eslint-import-resolver-alias": "^1.1",
|
|
21
20
|
"eslint-plugin-compat": "^4.0",
|
|
22
21
|
"eslint-plugin-css-modules": "^2.11",
|
|
23
22
|
"eslint-plugin-disable-autofix": "^0.1.6",
|
|
24
23
|
"eslint-plugin-github": "^4.3.5",
|
|
25
24
|
"eslint-plugin-import": "^2.25",
|
|
26
|
-
"eslint-plugin-json": "^3.1",
|
|
27
25
|
"eslint-plugin-json-format": "^2.0",
|
|
28
26
|
"eslint-plugin-jsonc": "^2.0.0",
|
|
29
27
|
"eslint-plugin-jsx-a11y": "^6.5",
|