@mikey-pro/eslint-config 2.5.3 → 3.0.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.
Files changed (2) hide show
  1. package/index.cjs +99 -43
  2. 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': 0,
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,
@@ -126,12 +217,15 @@ module.exports = {
126
217
  {
127
218
  alphabetize: {
128
219
  order: 'asc',
129
- caseInsensitive: true,
130
220
  },
131
221
  'newlines-between': 'always',
132
222
  },
133
223
  ],
134
224
  'import/extensions': ['error', 'always', { ignorePackages: true }],
225
+ 'eslint-comments/no-use': [
226
+ 'error',
227
+ { allow: ['eslint-disable', 'eslint-disable-next-line'] },
228
+ ],
135
229
  'import/no-commonjs': 0,
136
230
  'sort-imports': 0,
137
231
  'constructor-super': 2,
@@ -211,39 +305,6 @@ module.exports = {
211
305
  },
212
306
  },
213
307
  ],
214
- 'react/no-deprecated': 2,
215
- 'react/react-in-jsx-scope': 0,
216
- 'react/display-name': [1, { ignoreTranspilerName: false }],
217
- 'react/jsx-no-bind': [
218
- 1,
219
- {
220
- ignoreRefs: true,
221
- allowFunctions: true,
222
- allowArrowFunctions: true,
223
- },
224
- ],
225
- 'react/function-component-definition': 0,
226
- 'react/state-in-constructor': 0,
227
- 'react/jsx-no-comment-textnodes': 2,
228
- 'react/jsx-no-duplicate-props': 2,
229
- 'react/jsx-no-target-blank': 2,
230
- 'react/jsx-no-undef': 2,
231
- 'react/jsx-tag-spacing': [2, { beforeSelfClosing: 'always' }],
232
- 'react/jsx-uses-react': 2,
233
- 'react/jsx-uses-vars': 2,
234
- 'react/jsx-key': [2, { checkFragmentShorthand: true }],
235
- 'react/self-closing-comp': 2,
236
- 'react/prefer-es6-class': 2,
237
- 'react/prefer-stateless-function': 1,
238
- 'react/require-render-return': 2,
239
- 'react/no-danger': 1,
240
- 'react/no-did-mount-set-state': 2,
241
- 'react/no-did-update-set-state': 2,
242
- 'react/no-find-dom-node': 2,
243
- 'react/no-is-mounted': 2,
244
- 'react/no-string-refs': 2,
245
- 'react-hooks/rules-of-hooks': 2,
246
- 'react-hooks/exhaustive-deps': 1,
247
308
  'unicorn/import-index': [2, { ignoreImports: true }],
248
309
  'filenames/match-regex': 0,
249
310
  'unicorn/filename-case': [
@@ -256,20 +317,15 @@ module.exports = {
256
317
  ignore: ['README.md'],
257
318
  },
258
319
  ],
259
- 'prettier/prettier': [2],
320
+ 'prettier/prettier': [2, { parser: 'babel' }],
260
321
  },
261
322
  plugins: [
262
323
  'import',
263
324
  'prettier',
264
- 'json-format',
265
325
  'css-modules',
266
- '@html-eslint',
267
326
  'disable-autofix',
268
327
  '@babel',
269
- 'react',
270
- 'react-hooks',
271
328
  'unicorn',
272
- 'svelte3',
273
329
  'sonarjs',
274
330
  'github',
275
331
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikey-pro/eslint-config",
3
- "version": "2.5.3",
3
+ "version": "3.0.1",
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": {