@mikey-pro/eslint-config 3.0.1 → 3.1.2
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 +94 -46
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -43,47 +43,78 @@ 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
|
-
plugins: [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
plugins: [
|
|
53
|
+
'react',
|
|
54
|
+
'react-hooks',
|
|
55
|
+
[
|
|
56
|
+
'@babel/plugin-transform-react-jsx',
|
|
57
|
+
{
|
|
58
|
+
pragma: 'h',
|
|
59
|
+
pragmaFrag: 'Fragment',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
],
|
|
63
|
+
|
|
64
|
+
parser: '@babel/eslint-parser',
|
|
65
|
+
parserOptions: {
|
|
66
|
+
requireConfigFile: false,
|
|
67
|
+
ecmaVersion: 'latest',
|
|
68
|
+
sourceType: 'module',
|
|
69
|
+
babelOptions: {
|
|
70
|
+
presets: [
|
|
71
|
+
[
|
|
72
|
+
'@babel/preset-env',
|
|
73
|
+
{
|
|
74
|
+
targets: {
|
|
75
|
+
node: 'current',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
'@babel/preset-react',
|
|
80
|
+
'airbnb',
|
|
81
|
+
],
|
|
82
|
+
},
|
|
63
83
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
rules: {
|
|
85
|
+
'react/no-deprecated': 2,
|
|
86
|
+
'react/react-in-jsx-scope': 0,
|
|
87
|
+
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
88
|
+
'react/jsx-no-bind': [
|
|
89
|
+
1,
|
|
90
|
+
{
|
|
91
|
+
ignoreRefs: true,
|
|
92
|
+
allowFunctions: true,
|
|
93
|
+
allowArrowFunctions: true,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
'react/function-component-definition': 0,
|
|
97
|
+
'react/state-in-constructor': 0,
|
|
98
|
+
'react/jsx-no-comment-textnodes': 2,
|
|
99
|
+
'react/jsx-no-duplicate-props': 2,
|
|
100
|
+
'react/jsx-no-target-blank': 2,
|
|
101
|
+
'react/jsx-no-undef': 2,
|
|
102
|
+
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
|
|
103
|
+
'react/jsx-uses-react': 2,
|
|
104
|
+
'react/jsx-uses-vars': 2,
|
|
105
|
+
'react/jsx-key': [2, { checkFragmentShorthand: true }],
|
|
106
|
+
'react/self-closing-comp': 2,
|
|
107
|
+
'react/prefer-es6-class': 2,
|
|
108
|
+
'react/prefer-stateless-function': 1,
|
|
109
|
+
'react/require-render-return': 2,
|
|
110
|
+
'react/no-danger': 1,
|
|
111
|
+
'react/no-did-mount-set-state': 2,
|
|
112
|
+
'react/no-did-update-set-state': 2,
|
|
113
|
+
'react/no-find-dom-node': 2,
|
|
114
|
+
'react/no-is-mounted': 2,
|
|
115
|
+
'react/no-string-refs': 2,
|
|
116
|
+
'react-hooks/rules-of-hooks': 2,
|
|
117
|
+
'react-hooks/exhaustive-deps': 1,
|
|
87
118
|
},
|
|
88
119
|
},
|
|
89
120
|
{
|
|
@@ -130,6 +161,34 @@ module.exports = {
|
|
|
130
161
|
files: ['*.vue'],
|
|
131
162
|
parser: 'vue-eslint-parser',
|
|
132
163
|
extends: ['plugin:vue/vue3-recommended', '@vue/airbnb'],
|
|
164
|
+
parser: '@babel/eslint-parser',
|
|
165
|
+
parserOptions: {
|
|
166
|
+
requireConfigFile: false,
|
|
167
|
+
ecmaVersion: 'latest',
|
|
168
|
+
sourceType: 'module',
|
|
169
|
+
babelOptions: {
|
|
170
|
+
presets: [
|
|
171
|
+
[
|
|
172
|
+
'@babel/preset-env',
|
|
173
|
+
{
|
|
174
|
+
targets: {
|
|
175
|
+
node: 'current',
|
|
176
|
+
},
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
],
|
|
180
|
+
plugins: [
|
|
181
|
+
'@vue/babel-plugin-jsx',
|
|
182
|
+
[
|
|
183
|
+
'@babel/plugin-transform-react-jsx',
|
|
184
|
+
{
|
|
185
|
+
pragma: 'h',
|
|
186
|
+
pragmaFrag: 'Fragment',
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
},
|
|
133
192
|
rules: {
|
|
134
193
|
'vue/html-self-closing': [
|
|
135
194
|
2,
|
|
@@ -358,19 +417,8 @@ module.exports = {
|
|
|
358
417
|
},
|
|
359
418
|
},
|
|
360
419
|
],
|
|
361
|
-
'@babel/preset-react',
|
|
362
420
|
'airbnb',
|
|
363
421
|
],
|
|
364
|
-
plugins: [
|
|
365
|
-
'@vue/babel-plugin-jsx',
|
|
366
|
-
[
|
|
367
|
-
'@babel/plugin-transform-react-jsx',
|
|
368
|
-
{
|
|
369
|
-
pragma: 'h',
|
|
370
|
-
pragmaFrag: 'Fragment',
|
|
371
|
-
},
|
|
372
|
-
],
|
|
373
|
-
],
|
|
374
422
|
},
|
|
375
423
|
},
|
|
376
424
|
};
|