@mikey-pro/eslint-config 7.1.1 → 7.2.0
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 +123 -109
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -54,10 +54,9 @@ module.exports = {
|
|
|
54
54
|
},
|
|
55
55
|
plugins: ['@typescript-eslint'],
|
|
56
56
|
rules: {
|
|
57
|
-
'@typescript-eslint/unbound-method':
|
|
58
|
-
'@typescript-eslint/naming-convention':
|
|
59
|
-
|
|
60
|
-
'prettier/prettier': [1, { parser: 'typescript' }],
|
|
57
|
+
'@typescript-eslint/unbound-method': 'off',
|
|
58
|
+
'@typescript-eslint/naming-convention': 'off',
|
|
59
|
+
'prettier/prettier': ['warn', { parser: 'typescript' }],
|
|
61
60
|
},
|
|
62
61
|
settings: {
|
|
63
62
|
'import/parsers': {
|
|
@@ -73,19 +72,19 @@ module.exports = {
|
|
|
73
72
|
{
|
|
74
73
|
files: ['*.css'],
|
|
75
74
|
rules: {
|
|
76
|
-
'prettier/prettier': [
|
|
75
|
+
'prettier/prettier': ['warn', { parser: 'css' }],
|
|
77
76
|
},
|
|
78
77
|
},
|
|
79
78
|
{
|
|
80
79
|
files: ['*.scss'],
|
|
81
80
|
rules: {
|
|
82
|
-
'prettier/prettier': [
|
|
81
|
+
'prettier/prettier': ['warn', { parser: 'scss' }],
|
|
83
82
|
},
|
|
84
83
|
},
|
|
85
84
|
{
|
|
86
85
|
files: ['*.less'],
|
|
87
86
|
rules: {
|
|
88
|
-
'prettier/prettier': [
|
|
87
|
+
'prettier/prettier': ['warn', { parser: 'less' }],
|
|
89
88
|
},
|
|
90
89
|
},
|
|
91
90
|
{
|
|
@@ -93,8 +92,8 @@ module.exports = {
|
|
|
93
92
|
files: ['*.yaml', '*.yml'],
|
|
94
93
|
parser: 'yaml-eslint-parser',
|
|
95
94
|
rules: {
|
|
96
|
-
'yml/quotes': [
|
|
97
|
-
'prettier/prettier': [
|
|
95
|
+
'yml/quotes': ['warn', { prefer: 'double', avoidEscape: true }],
|
|
96
|
+
'prettier/prettier': ['warn', { parser: 'yaml', singleQuote: false }],
|
|
98
97
|
},
|
|
99
98
|
},
|
|
100
99
|
{
|
|
@@ -102,7 +101,7 @@ module.exports = {
|
|
|
102
101
|
files: ['*.toml'],
|
|
103
102
|
parser: 'toml-eslint-parser',
|
|
104
103
|
rules: {
|
|
105
|
-
'prettier/prettier':
|
|
104
|
+
'prettier/prettier': 'off',
|
|
106
105
|
},
|
|
107
106
|
},
|
|
108
107
|
{
|
|
@@ -110,15 +109,15 @@ module.exports = {
|
|
|
110
109
|
parser: 'eslint-plugin-markdownlint/parser',
|
|
111
110
|
extends: ['plugin:markdownlint/recommended'],
|
|
112
111
|
rules: {
|
|
113
|
-
'markdownlint/md033':
|
|
114
|
-
'markdownlint/md041':
|
|
115
|
-
'prettier/prettier': [
|
|
112
|
+
'markdownlint/md033': 'off',
|
|
113
|
+
'markdownlint/md041': 'off',
|
|
114
|
+
'prettier/prettier': ['warn', { parser: 'markdown' }],
|
|
116
115
|
},
|
|
117
116
|
},
|
|
118
117
|
{
|
|
119
118
|
files: ['package.json'],
|
|
120
119
|
rules: {
|
|
121
|
-
'prettier/prettier': [
|
|
120
|
+
'prettier/prettier': ['warn', { parser: 'json' }],
|
|
122
121
|
},
|
|
123
122
|
settings: {
|
|
124
123
|
'json/json-with-comments-files': [],
|
|
@@ -155,7 +154,7 @@ module.exports = {
|
|
|
155
154
|
{
|
|
156
155
|
files: ['*.md.json'],
|
|
157
156
|
rules: {
|
|
158
|
-
'prettier/prettier': [
|
|
157
|
+
'prettier/prettier': ['warn', { parser: 'json' }],
|
|
159
158
|
},
|
|
160
159
|
},
|
|
161
160
|
{
|
|
@@ -164,15 +163,15 @@ module.exports = {
|
|
|
164
163
|
parser: '@html-eslint/parser',
|
|
165
164
|
plugins: ['@html-eslint'],
|
|
166
165
|
rules: {
|
|
167
|
-
'@html-eslint/indent':
|
|
168
|
-
'@html-eslint/no-extra-spacing-attrs':
|
|
169
|
-
'@html-eslint/require-closing-tags':
|
|
166
|
+
'@html-eslint/indent': 'off',
|
|
167
|
+
'@html-eslint/no-extra-spacing-attrs': 'off',
|
|
168
|
+
'@html-eslint/require-closing-tags': 'off',
|
|
170
169
|
'disable-autofix/@html-eslint/require-closing-tags': [
|
|
171
|
-
|
|
170
|
+
'warn',
|
|
172
171
|
{ selfClosing: 'always' },
|
|
173
172
|
],
|
|
174
|
-
'spaced-comment':
|
|
175
|
-
'prettier/prettier': [
|
|
173
|
+
'spaced-comment': 'off',
|
|
174
|
+
'prettier/prettier': ['warn', { parser: 'html' }],
|
|
176
175
|
},
|
|
177
176
|
},
|
|
178
177
|
{
|
|
@@ -180,7 +179,7 @@ module.exports = {
|
|
|
180
179
|
files: ['*.jsonc', '*rc'],
|
|
181
180
|
parser: 'jsonc-eslint-parser',
|
|
182
181
|
rules: {
|
|
183
|
-
'prettier/prettier': [
|
|
182
|
+
'prettier/prettier': ['warn', { parser: 'json' }],
|
|
184
183
|
},
|
|
185
184
|
},
|
|
186
185
|
{
|
|
@@ -188,16 +187,32 @@ module.exports = {
|
|
|
188
187
|
files: ['*.json5'],
|
|
189
188
|
parser: 'jsonc-eslint-parser',
|
|
190
189
|
rules: {
|
|
191
|
-
'prettier/prettier': [
|
|
190
|
+
'prettier/prettier': ['warn', { parser: 'json5' }],
|
|
192
191
|
},
|
|
193
192
|
},
|
|
194
193
|
{
|
|
195
|
-
files: ['*.test
|
|
194
|
+
files: ['*.test.js'],
|
|
196
195
|
plugins: ['jest'],
|
|
197
196
|
extends: ['plugin:jest/all'],
|
|
197
|
+
env: {
|
|
198
|
+
jest: true,
|
|
199
|
+
},
|
|
200
|
+
rules: {
|
|
201
|
+
'unicorn/no-array-callback-reference': 'off',
|
|
202
|
+
'jest/unbound-method': 'off',
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
files: ['*.test.ts'],
|
|
207
|
+
parser: '@typescript-eslint/parser',
|
|
208
|
+
plugins: ['@typescript-eslint', 'jest'],
|
|
209
|
+
extends: ['plugin:jest/all'],
|
|
210
|
+
env: {
|
|
211
|
+
jest: true,
|
|
212
|
+
},
|
|
198
213
|
rules: {
|
|
199
|
-
'unicorn/no-array-callback-reference':
|
|
200
|
-
'jest/unbound-method':
|
|
214
|
+
'unicorn/no-array-callback-reference': 'off',
|
|
215
|
+
'jest/unbound-method': 'off',
|
|
201
216
|
},
|
|
202
217
|
},
|
|
203
218
|
{
|
|
@@ -236,23 +251,23 @@ module.exports = {
|
|
|
236
251
|
],
|
|
237
252
|
root: true,
|
|
238
253
|
rules: {
|
|
239
|
-
camelcase:
|
|
240
|
-
'class-methods-use-this':
|
|
241
|
-
'constructor-super':
|
|
242
|
-
'dot-notation':
|
|
243
|
-
'func-names':
|
|
244
|
-
'import/extensions': [
|
|
245
|
-
'import/no-commonjs':
|
|
246
|
-
'import/default':
|
|
247
|
-
'import/named':
|
|
248
|
-
'import/namespace':
|
|
249
|
-
'import/no-named-as-default-member':
|
|
254
|
+
camelcase: 'warn',
|
|
255
|
+
'class-methods-use-this': 'off',
|
|
256
|
+
'constructor-super': 'warn',
|
|
257
|
+
'dot-notation': 'warn',
|
|
258
|
+
'func-names': 'off',
|
|
259
|
+
'import/extensions': ['warn', 'never', { ignorePackages: true }],
|
|
260
|
+
'import/no-commonjs': 'off',
|
|
261
|
+
'import/default': 'off',
|
|
262
|
+
'import/named': 'off',
|
|
263
|
+
'import/namespace': 'off',
|
|
264
|
+
'import/no-named-as-default-member': 'off',
|
|
250
265
|
'import/no-unresolved': [
|
|
251
|
-
|
|
266
|
+
'warn',
|
|
252
267
|
{ amd: true, commonjs: true, ignore: ['^node:'] },
|
|
253
268
|
],
|
|
254
269
|
'import/order': [
|
|
255
|
-
|
|
270
|
+
'warn',
|
|
256
271
|
{
|
|
257
272
|
alphabetize: {
|
|
258
273
|
order: 'asc',
|
|
@@ -260,33 +275,33 @@ module.exports = {
|
|
|
260
275
|
'newlines-between': 'always',
|
|
261
276
|
},
|
|
262
277
|
],
|
|
263
|
-
'jsx-quotes':
|
|
264
|
-
'keyword-spacing':
|
|
265
|
-
'no-caller':
|
|
266
|
-
'no-confusing-arrow':
|
|
267
|
-
'no-console':
|
|
268
|
-
'no-const-assign':
|
|
269
|
-
'no-delete-var':
|
|
270
|
-
'no-dupe-class-members':
|
|
271
|
-
'no-dupe-keys':
|
|
272
|
-
'no-duplicate-imports':
|
|
273
|
-
'no-else-return':
|
|
274
|
-
'no-empty':
|
|
275
|
-
'no-empty-pattern':
|
|
276
|
-
'no-extra-parens':
|
|
277
|
-
'no-extra-bind':
|
|
278
|
-
'no-extra-semi':
|
|
279
|
-
'no-floating-decimal':
|
|
280
|
-
'no-iterator':
|
|
281
|
-
'no-lonely-if':
|
|
282
|
-
'no-mixed-spaces-and-tabs': [
|
|
283
|
-
'no-multi-str':
|
|
284
|
-
'no-new-wrappers':
|
|
285
|
-
'no-process-exit':
|
|
286
|
-
'no-proto':
|
|
287
|
-
'no-redeclare':
|
|
278
|
+
'jsx-quotes': 'warn',
|
|
279
|
+
'keyword-spacing': 'warn',
|
|
280
|
+
'no-caller': 'warn',
|
|
281
|
+
'no-confusing-arrow': 'warn',
|
|
282
|
+
'no-console': 'off',
|
|
283
|
+
'no-const-assign': 'warn',
|
|
284
|
+
'no-delete-var': 'warn',
|
|
285
|
+
'no-dupe-class-members': 'warn',
|
|
286
|
+
'no-dupe-keys': 'warn',
|
|
287
|
+
'no-duplicate-imports': 'warn',
|
|
288
|
+
'no-else-return': 'warn',
|
|
289
|
+
'no-empty': 'off',
|
|
290
|
+
'no-empty-pattern': 'off',
|
|
291
|
+
'no-extra-parens': 'off',
|
|
292
|
+
'no-extra-bind': 'warn',
|
|
293
|
+
'no-extra-semi': 'warn',
|
|
294
|
+
'no-floating-decimal': 'warn',
|
|
295
|
+
'no-iterator': 'warn',
|
|
296
|
+
'no-lonely-if': 'warn',
|
|
297
|
+
'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
|
|
298
|
+
'no-multi-str': 'warn',
|
|
299
|
+
'no-new-wrappers': 'warn',
|
|
300
|
+
'no-process-exit': 'off',
|
|
301
|
+
'no-proto': 'warn',
|
|
302
|
+
'no-redeclare': 'warn',
|
|
288
303
|
'no-restricted-syntax': [
|
|
289
|
-
|
|
304
|
+
'warn',
|
|
290
305
|
{
|
|
291
306
|
message:
|
|
292
307
|
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',
|
|
@@ -303,68 +318,68 @@ module.exports = {
|
|
|
303
318
|
selector: 'WithStatement',
|
|
304
319
|
},
|
|
305
320
|
],
|
|
306
|
-
'no-shadow':
|
|
307
|
-
'no-shadow-restricted-names':
|
|
308
|
-
'no-spaced-func':
|
|
309
|
-
'no-this-before-super':
|
|
310
|
-
'no-undef-init':
|
|
311
|
-
'no-underscore-dangle':
|
|
312
|
-
'no-unneeded-ternary':
|
|
321
|
+
'no-shadow': 'off',
|
|
322
|
+
'no-shadow-restricted-names': 'warn',
|
|
323
|
+
'no-spaced-func': 'warn',
|
|
324
|
+
'no-this-before-super': 'warn',
|
|
325
|
+
'no-undef-init': 'warn',
|
|
326
|
+
'no-underscore-dangle': 'off',
|
|
327
|
+
'no-unneeded-ternary': 'warn',
|
|
313
328
|
'no-unused-vars': [
|
|
314
|
-
|
|
329
|
+
'warn',
|
|
315
330
|
{
|
|
316
331
|
args: 'after-used',
|
|
317
332
|
ignoreRestSiblings: true,
|
|
318
333
|
},
|
|
319
334
|
],
|
|
320
|
-
'no-useless-call':
|
|
321
|
-
'no-useless-computed-key':
|
|
322
|
-
'no-useless-concat':
|
|
323
|
-
'no-useless-constructor':
|
|
324
|
-
'no-useless-escape':
|
|
325
|
-
'no-useless-rename':
|
|
326
|
-
'no-useless-return':
|
|
327
|
-
'no-var':
|
|
328
|
-
'no-with':
|
|
329
|
-
'object-curly-spacing': [
|
|
330
|
-
'object-shorthand':
|
|
331
|
-
'prefer-arrow-callback':
|
|
335
|
+
'no-useless-call': 'warn',
|
|
336
|
+
'no-useless-computed-key': 'warn',
|
|
337
|
+
'no-useless-concat': 'warn',
|
|
338
|
+
'no-useless-constructor': 'warn',
|
|
339
|
+
'no-useless-escape': 'warn',
|
|
340
|
+
'no-useless-rename': 'warn',
|
|
341
|
+
'no-useless-return': 'warn',
|
|
342
|
+
'no-var': 'warn',
|
|
343
|
+
'no-with': 'warn',
|
|
344
|
+
'object-curly-spacing': ['off', 'always'],
|
|
345
|
+
'object-shorthand': 'warn',
|
|
346
|
+
'prefer-arrow-callback': 'warn',
|
|
332
347
|
'prefer-destructuring': [
|
|
333
|
-
|
|
348
|
+
'warn',
|
|
334
349
|
{
|
|
335
350
|
array: false,
|
|
336
351
|
object: true,
|
|
337
352
|
},
|
|
338
353
|
],
|
|
339
|
-
'prefer-rest-params':
|
|
340
|
-
'prefer-spread':
|
|
341
|
-
'prefer-template':
|
|
342
|
-
'prefer-const':
|
|
343
|
-
'disable-autofix/prefer-const':
|
|
344
|
-
'prettier/prettier': [
|
|
345
|
-
'quote-props': [
|
|
354
|
+
'prefer-rest-params': 'warn',
|
|
355
|
+
'prefer-spread': 'warn',
|
|
356
|
+
'prefer-template': 'warn',
|
|
357
|
+
'prefer-const': 'off',
|
|
358
|
+
'disable-autofix/prefer-const': 'warn',
|
|
359
|
+
'prettier/prettier': ['warn', { parser: 'babel' }],
|
|
360
|
+
'quote-props': ['warn', 'as-needed'],
|
|
346
361
|
quotes: [
|
|
347
|
-
|
|
362
|
+
'off',
|
|
348
363
|
'single',
|
|
349
364
|
{
|
|
350
365
|
allowTemplateLiterals: true,
|
|
351
366
|
avoidEscape: true,
|
|
352
367
|
},
|
|
353
368
|
],
|
|
354
|
-
radix:
|
|
355
|
-
'filenames/match-regex':
|
|
356
|
-
'require-atomic-updates':
|
|
357
|
-
'sort-imports':
|
|
358
|
-
'rest-spread-spacing':
|
|
359
|
-
semi:
|
|
360
|
-
'sort-vars':
|
|
369
|
+
radix: 'warn',
|
|
370
|
+
'filenames/match-regex': 'off',
|
|
371
|
+
'require-atomic-updates': 'off',
|
|
372
|
+
'sort-imports': 'off',
|
|
373
|
+
'rest-spread-spacing': 'off',
|
|
374
|
+
semi: 'off',
|
|
375
|
+
'sort-vars': 'warn',
|
|
361
376
|
'space-before-function-paren': [
|
|
362
|
-
|
|
377
|
+
'off',
|
|
363
378
|
{ anonymous: 'always', asyncArrow: 'always', named: 'never' },
|
|
364
379
|
],
|
|
365
|
-
'space-in-parens': [
|
|
380
|
+
'space-in-parens': ['off', 'never'],
|
|
366
381
|
'spaced-comment': [
|
|
367
|
-
|
|
382
|
+
'warn',
|
|
368
383
|
'always',
|
|
369
384
|
{
|
|
370
385
|
block: {
|
|
@@ -378,10 +393,10 @@ module.exports = {
|
|
|
378
393
|
},
|
|
379
394
|
},
|
|
380
395
|
],
|
|
381
|
-
strict: [
|
|
382
|
-
'unicode-bom':
|
|
396
|
+
strict: ['warn', 'never'],
|
|
397
|
+
'unicode-bom': 'warn',
|
|
383
398
|
'unicorn/filename-case': [
|
|
384
|
-
|
|
399
|
+
'warn',
|
|
385
400
|
{
|
|
386
401
|
cases: {
|
|
387
402
|
camelCase: true,
|
|
@@ -390,8 +405,7 @@ module.exports = {
|
|
|
390
405
|
ignore: ['.*.md'],
|
|
391
406
|
},
|
|
392
407
|
],
|
|
393
|
-
'unicorn/import-index': [
|
|
394
|
-
'valid-jsdoc': 0,
|
|
408
|
+
'unicorn/import-index': ['warn', { ignoreImports: true }],
|
|
395
409
|
},
|
|
396
410
|
settings: {
|
|
397
411
|
polyfills: ['Promise'],
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikey-pro/eslint-config",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Mikey Pro ESLint configuration",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@babel/core": "^7.
|
|
7
|
+
"@babel/core": "^7.24.0",
|
|
8
8
|
"@babel/eslint-parser": "^7.23",
|
|
9
9
|
"@babel/eslint-plugin": "^7.23",
|
|
10
|
-
"@babel/preset-env": "^7.
|
|
10
|
+
"@babel/preset-env": "^7.24",
|
|
11
11
|
"@cypress/eslint-plugin-json": "^3.2.3",
|
|
12
12
|
"@html-eslint/eslint-plugin": "^0.23.1",
|
|
13
13
|
"@html-eslint/parser": "^0.23.0",
|
|
14
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
15
|
-
"@typescript-eslint/parser": "^7.
|
|
14
|
+
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
|
15
|
+
"@typescript-eslint/parser": "^7.1.1",
|
|
16
16
|
"eslint-config-prettier": "^9.1",
|
|
17
17
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
18
18
|
"eslint-plugin-compat": "^4.2",
|