@mikey-pro/eslint-config 2.5.4 → 3.0.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 +99 -42
- package/package.json +4 -3
package/index.cjs
CHANGED
|
@@ -9,11 +9,83 @@ module.exports = {
|
|
|
9
9
|
'plugin:sonarjs/recommended',
|
|
10
10
|
'plugin:compat/recommended',
|
|
11
11
|
'plugin:css-modules/recommended',
|
|
12
|
-
'plugin:react/recommended',
|
|
13
|
-
'plugin:react-hooks/recommended',
|
|
14
12
|
'plugin:prettier/recommended',
|
|
15
13
|
],
|
|
16
14
|
overrides: [
|
|
15
|
+
{
|
|
16
|
+
files: ['*.css'],
|
|
17
|
+
rules: {
|
|
18
|
+
'prettier/prettier': [2, { parser: 'css' }],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
files: ['*.scss'],
|
|
23
|
+
rules: {
|
|
24
|
+
'prettier/prettier': [2, { parser: 'scss' }],
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
files: ['*.less'],
|
|
29
|
+
rules: {
|
|
30
|
+
'prettier/prettier': [2, { parser: 'less' }],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
files: ['*.yaml', '*.yml'],
|
|
35
|
+
plugins: ['yaml'],
|
|
36
|
+
extends: ['plugin:yaml/recommended'],
|
|
37
|
+
rules: {
|
|
38
|
+
'prettier/prettier': [2, { parser: 'yaml' }],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
files: ['*.toml'],
|
|
43
|
+
parser: 'toml-eslint-parser',
|
|
44
|
+
extends: ['plugin:toml/standard'],
|
|
45
|
+
rules: {
|
|
46
|
+
'prettier/prettier': [2],
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
files: ['*.jsx'],
|
|
51
|
+
extends: ['plugin:react/recommended', 'plugin:react-hooks/recommended'],
|
|
52
|
+
plugins: ['react', 'react-hooks'],
|
|
53
|
+
rules: {
|
|
54
|
+
'react/no-deprecated': 2,
|
|
55
|
+
'react/react-in-jsx-scope': 0,
|
|
56
|
+
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
57
|
+
'react/jsx-no-bind': [
|
|
58
|
+
1,
|
|
59
|
+
{
|
|
60
|
+
ignoreRefs: true,
|
|
61
|
+
allowFunctions: true,
|
|
62
|
+
allowArrowFunctions: true,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
'react/function-component-definition': 0,
|
|
66
|
+
'react/state-in-constructor': 0,
|
|
67
|
+
'react/jsx-no-comment-textnodes': 2,
|
|
68
|
+
'react/jsx-no-duplicate-props': 2,
|
|
69
|
+
'react/jsx-no-target-blank': 2,
|
|
70
|
+
'react/jsx-no-undef': 2,
|
|
71
|
+
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
|
|
72
|
+
'react/jsx-uses-react': 2,
|
|
73
|
+
'react/jsx-uses-vars': 2,
|
|
74
|
+
'react/jsx-key': [2, { checkFragmentShorthand: true }],
|
|
75
|
+
'react/self-closing-comp': 2,
|
|
76
|
+
'react/prefer-es6-class': 2,
|
|
77
|
+
'react/prefer-stateless-function': 1,
|
|
78
|
+
'react/require-render-return': 2,
|
|
79
|
+
'react/no-danger': 1,
|
|
80
|
+
'react/no-did-mount-set-state': 2,
|
|
81
|
+
'react/no-did-update-set-state': 2,
|
|
82
|
+
'react/no-find-dom-node': 2,
|
|
83
|
+
'react/no-is-mounted': 2,
|
|
84
|
+
'react/no-string-refs': 2,
|
|
85
|
+
'react-hooks/rules-of-hooks': 2,
|
|
86
|
+
'react-hooks/exhaustive-deps': 1,
|
|
87
|
+
},
|
|
88
|
+
},
|
|
17
89
|
{
|
|
18
90
|
files: ['*.md'],
|
|
19
91
|
parser: 'markdown-eslint-parser',
|
|
@@ -41,6 +113,7 @@ module.exports = {
|
|
|
41
113
|
files: ['*.html'],
|
|
42
114
|
parser: '@html-eslint/parser',
|
|
43
115
|
extends: ['plugin:@html-eslint/recommended'],
|
|
116
|
+
plugins: ['@html-eslint'],
|
|
44
117
|
rules: {
|
|
45
118
|
'spaced-comment': 0,
|
|
46
119
|
'@html-eslint/indent': 0,
|
|
@@ -70,12 +143,13 @@ module.exports = {
|
|
|
70
143
|
math: 'always',
|
|
71
144
|
},
|
|
72
145
|
],
|
|
73
|
-
'prettier/prettier':
|
|
146
|
+
'prettier/prettier': [2, { parser: 'vue' }],
|
|
74
147
|
},
|
|
75
148
|
},
|
|
76
149
|
{
|
|
77
150
|
files: ['*.svelte'],
|
|
78
151
|
processor: 'svelte3/svelte3',
|
|
152
|
+
plugins: ['svelte3'],
|
|
79
153
|
rules: {
|
|
80
154
|
'import/first': 0,
|
|
81
155
|
'import/no-duplicates': 0,
|
|
@@ -84,6 +158,23 @@ module.exports = {
|
|
|
84
158
|
'prettier/prettier': 0,
|
|
85
159
|
},
|
|
86
160
|
},
|
|
161
|
+
{
|
|
162
|
+
files: ['*.json', '*.jsonc', '*rc'],
|
|
163
|
+
extends: ['plugin:jsonc/all'],
|
|
164
|
+
parser: 'jsonc-eslint-parser',
|
|
165
|
+
plugins: ['json-format'],
|
|
166
|
+
rules: {
|
|
167
|
+
'prettier/prettier': [2, { parser: 'json' }],
|
|
168
|
+
},
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
files: ['*.json5'],
|
|
172
|
+
extends: ['plugin:jsonc/all'],
|
|
173
|
+
parser: 'jsonc-eslint-parser',
|
|
174
|
+
rules: {
|
|
175
|
+
'prettier/prettier': [2, { parser: 'json5' }],
|
|
176
|
+
},
|
|
177
|
+
},
|
|
87
178
|
],
|
|
88
179
|
env: {
|
|
89
180
|
browser: true,
|
|
@@ -131,6 +222,10 @@ module.exports = {
|
|
|
131
222
|
},
|
|
132
223
|
],
|
|
133
224
|
'import/extensions': ['error', 'always', { ignorePackages: true }],
|
|
225
|
+
'eslint-comments/no-use': [
|
|
226
|
+
'error',
|
|
227
|
+
{ allow: ['eslint-disable', 'eslint-disable-next-line'] },
|
|
228
|
+
],
|
|
134
229
|
'import/no-commonjs': 0,
|
|
135
230
|
'sort-imports': 0,
|
|
136
231
|
'constructor-super': 2,
|
|
@@ -210,39 +305,6 @@ module.exports = {
|
|
|
210
305
|
},
|
|
211
306
|
},
|
|
212
307
|
],
|
|
213
|
-
'react/no-deprecated': 2,
|
|
214
|
-
'react/react-in-jsx-scope': 0,
|
|
215
|
-
'react/display-name': [1, { ignoreTranspilerName: false }],
|
|
216
|
-
'react/jsx-no-bind': [
|
|
217
|
-
1,
|
|
218
|
-
{
|
|
219
|
-
ignoreRefs: true,
|
|
220
|
-
allowFunctions: true,
|
|
221
|
-
allowArrowFunctions: true,
|
|
222
|
-
},
|
|
223
|
-
],
|
|
224
|
-
'react/function-component-definition': 0,
|
|
225
|
-
'react/state-in-constructor': 0,
|
|
226
|
-
'react/jsx-no-comment-textnodes': 2,
|
|
227
|
-
'react/jsx-no-duplicate-props': 2,
|
|
228
|
-
'react/jsx-no-target-blank': 2,
|
|
229
|
-
'react/jsx-no-undef': 2,
|
|
230
|
-
'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
|
|
231
|
-
'react/jsx-uses-react': 2,
|
|
232
|
-
'react/jsx-uses-vars': 2,
|
|
233
|
-
'react/jsx-key': [2, { checkFragmentShorthand: true }],
|
|
234
|
-
'react/self-closing-comp': 2,
|
|
235
|
-
'react/prefer-es6-class': 2,
|
|
236
|
-
'react/prefer-stateless-function': 1,
|
|
237
|
-
'react/require-render-return': 2,
|
|
238
|
-
'react/no-danger': 1,
|
|
239
|
-
'react/no-did-mount-set-state': 2,
|
|
240
|
-
'react/no-did-update-set-state': 2,
|
|
241
|
-
'react/no-find-dom-node': 2,
|
|
242
|
-
'react/no-is-mounted': 2,
|
|
243
|
-
'react/no-string-refs': 2,
|
|
244
|
-
'react-hooks/rules-of-hooks': 2,
|
|
245
|
-
'react-hooks/exhaustive-deps': 1,
|
|
246
308
|
'unicorn/import-index': [2, { ignoreImports: true }],
|
|
247
309
|
'filenames/match-regex': 0,
|
|
248
310
|
'unicorn/filename-case': [
|
|
@@ -255,20 +317,15 @@ module.exports = {
|
|
|
255
317
|
ignore: ['README.md'],
|
|
256
318
|
},
|
|
257
319
|
],
|
|
258
|
-
'prettier/prettier': [2],
|
|
320
|
+
'prettier/prettier': [2, { parser: 'babel' }],
|
|
259
321
|
},
|
|
260
322
|
plugins: [
|
|
261
323
|
'import',
|
|
262
324
|
'prettier',
|
|
263
|
-
'json-format',
|
|
264
325
|
'css-modules',
|
|
265
|
-
'@html-eslint',
|
|
266
326
|
'disable-autofix',
|
|
267
327
|
'@babel',
|
|
268
|
-
'react',
|
|
269
|
-
'react-hooks',
|
|
270
328
|
'unicorn',
|
|
271
|
-
'svelte3',
|
|
272
329
|
'sonarjs',
|
|
273
330
|
'github',
|
|
274
331
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikey-pro/eslint-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "Mikey Pro ESLint configuration",
|
|
5
5
|
"main": "index.cjs",
|
|
6
6
|
"dependencies": {
|
|
@@ -17,14 +17,13 @@
|
|
|
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",
|
|
26
|
+
"eslint-plugin-jsonc": "^2.0.0",
|
|
28
27
|
"eslint-plugin-jsx-a11y": "^6.5",
|
|
29
28
|
"eslint-plugin-md": "^1.0",
|
|
30
29
|
"eslint-plugin-node": "^11.1.0",
|
|
@@ -34,8 +33,10 @@
|
|
|
34
33
|
"eslint-plugin-react-hooks": "^4.3",
|
|
35
34
|
"eslint-plugin-sonarjs": "^0.10.0",
|
|
36
35
|
"eslint-plugin-svelte3": "^3.2.1",
|
|
36
|
+
"eslint-plugin-toml": "^0.3.0",
|
|
37
37
|
"eslint-plugin-unicorn": "^39.0.0",
|
|
38
38
|
"eslint-plugin-vue": "^8.1",
|
|
39
|
+
"eslint-plugin-yaml": "^0.5.0",
|
|
39
40
|
"vue-eslint-parser": "^8.0"
|
|
40
41
|
},
|
|
41
42
|
"peerDependencies": {
|