@mikey-pro/eslint-config 8.1.1 → 9.0.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.
Files changed (6) hide show
  1. package/README.md +14 -2
  2. package/flat.js +48 -0
  3. package/index.js +32 -150
  4. package/overrides.js +114 -119
  5. package/package.json +50 -32
  6. package/rules.js +437 -106
package/rules.js CHANGED
@@ -1,4 +1,14 @@
1
+ // Modern ESLint rules for Mikey Pro
2
+ // Ultimate coding style guide for excellence
3
+
1
4
  export const baseRules = {
5
+ // === CORE ESLINT RULES ===
6
+
7
+ // Best Practices
8
+ 'accessor-pairs': 'error',
9
+ 'array-callback-return': 'error',
10
+ 'block-scoped-var': 'error',
11
+ // === BOUNDARIES RULES ===
2
12
  'boundaries/element-types': [
3
13
  'warn',
4
14
  {
@@ -10,35 +20,45 @@ export const baseRules = {
10
20
  ],
11
21
  },
12
22
  ],
13
- camelcase: [
14
- 'error',
15
- {
16
- ignoreDestructuring: true,
17
- ignoreGlobals: true,
18
- ignoreImports: true,
19
- properties: 'never',
20
- },
21
- ],
22
- 'class-methods-use-this': 'off',
23
+ 'class-methods-use-this': 'off', // Handled by TypeScript rules
24
+ // === COMPAT RULES ===
25
+ 'compat/compat': 'warn',
23
26
  complexity: ['error', { max: 15 }],
24
- 'constructor-super': 'warn',
27
+ 'consistent-return': 'error',
28
+ 'css-modules/no-undef-class': 'warn',
29
+ // === CSS MODULES RULES ===
30
+ 'css-modules/no-unused-class': 'warn',
31
+ curly: ['error', 'all'],
32
+ 'default-case': 'error',
33
+ 'default-case-last': 'error',
34
+ 'default-param-last': 'error',
25
35
  'dot-notation': 'warn',
36
+ eqeqeq: ['error', 'always', { null: 'ignore' }],
37
+ 'filenames/match-exported': 'off',
38
+ // === FILENAMES RULES ===
26
39
  'filenames/match-regex': 'off',
27
- 'func-names': 'off',
40
+ 'filenames/no-index': 'off',
41
+ 'grouped-accessor-pairs': 'error',
42
+ 'guard-for-in': 'error',
43
+ // === IMPORT/EXPORT RULES ===
28
44
  'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
29
45
  'import/default': 'off',
30
- 'import/extensions': ['warn', 'ignorePackages', { ts: 'never' }],
31
- 'import/named': 'off',
32
- 'import/namespace': 'off',
33
- 'import/no-commonjs': 'off',
34
- 'import/no-cycle': [
46
+ 'import/export': 'error',
47
+ 'import/extensions': [
35
48
  'error',
36
- {
37
- ignoreExternal: true,
38
- maxDepth: 1,
39
- },
49
+ 'ignorePackages',
50
+ { ts: 'never', tsx: 'never' },
40
51
  ],
52
+ 'import/first': 'error',
53
+ 'import/named': 'off',
54
+ 'import/namespace': 'off',
55
+ 'import/newline-after-import': 'error',
56
+ 'import/no-absolute-path': 'error',
57
+ 'import/no-cycle': ['error', { ignoreExternal: true, maxDepth: 1 }],
58
+ 'import/no-default-export': 'off',
59
+ 'import/no-deprecated': 'warn',
41
60
  'import/no-duplicates': ['error', { 'prefer-inline': true }],
61
+ 'import/no-dynamic-require': 'error',
42
62
  'import/no-empty-named-blocks': 'error',
43
63
  'import/no-extraneous-dependencies': [
44
64
  'error',
@@ -47,37 +67,84 @@ export const baseRules = {
47
67
  },
48
68
  ],
49
69
  'import/no-import-module-exports': 'error',
70
+ 'import/no-internal-modules': 'off',
71
+ 'import/no-mutable-exports': 'error',
72
+ 'import/no-named-as-default': 'off',
50
73
  'import/no-named-as-default-member': 'off',
74
+ 'import/no-named-default': 'error',
51
75
  'import/no-namespace': 'error',
76
+ 'import/no-nodejs-modules': 'off',
52
77
  'import/no-relative-packages': 'error',
53
78
  'import/no-relative-parent-imports': [
54
79
  'error',
55
- {
56
- ignore: ['@/components', '@/utils', '@/types'],
57
- },
80
+ { ignore: ['@/components', '@/utils', '@/types'] },
58
81
  ],
82
+ 'import/no-restricted-paths': 'off',
59
83
  'import/no-self-import': 'error',
84
+ 'import/no-unassigned-import': 'off',
60
85
  'import/no-unresolved': [
61
86
  'error',
62
87
  { amd: true, commonjs: true, ignore: ['^node:'] },
63
88
  ],
89
+ 'import/no-unused-modules': 'off',
90
+ 'import/no-useless-path-segments': 'error',
91
+ 'import/no-webpack-loader-syntax': 'error',
64
92
  'import/order': [
65
- 'warn',
93
+ 'error',
66
94
  {
67
- alphabetize: {
68
- order: 'asc',
69
- },
95
+ alphabetize: { order: 'asc' },
70
96
  'newlines-between': 'always',
97
+ pathGroups: [
98
+ {
99
+ group: 'builtin',
100
+ pattern: 'node:*',
101
+ position: 'before',
102
+ },
103
+ {
104
+ group: 'external',
105
+ pattern: '@*',
106
+ position: 'after',
107
+ },
108
+ {
109
+ group: 'internal',
110
+ pattern: '@/**',
111
+ position: 'after',
112
+ },
113
+ ],
114
+ pathGroupsExcludedImportTypes: ['builtin'],
71
115
  },
72
116
  ],
73
- 'jsx-quotes': 'warn',
74
- 'keyword-spacing': 'warn',
75
- 'logical-assignment-operators': [
76
- 'warn',
77
- 'always',
78
- { enforceForIfStatements: true },
79
- ],
117
+ 'import/prefer-default-export': 'off',
118
+ 'import/unambiguous': 'off',
119
+ // === VARIABLES ===
120
+ 'init-declarations': 'off', // Handled by TypeScript rules
121
+ // === JEST-DOM RULES ===
122
+ 'jest-dom/prefer-checked': 'error',
123
+ 'jest-dom/prefer-enabled-disabled': 'error',
124
+ 'jest-dom/prefer-focus': 'error',
125
+ 'jest-dom/prefer-required': 'error',
126
+ 'jest-dom/prefer-to-have-attribute': 'error',
127
+ // === JEST RULES ===
128
+ 'jest/expect-expect': 'warn',
129
+ 'jest/no-disabled-tests': 'warn',
130
+ 'jest/no-focused-tests': 'error',
131
+ 'jest/no-identical-title': 'error',
132
+ 'jest/prefer-to-have-length': 'warn',
133
+ 'jest/valid-expect': 'error',
80
134
  'max-classes-per-file': ['error', 1],
135
+ 'max-depth': ['error', 4],
136
+ 'max-lines': [
137
+ 'error',
138
+ { max: 500, skipBlankLines: true, skipComments: true },
139
+ ],
140
+ 'max-lines-per-function': [
141
+ 'error',
142
+ { max: 50, skipBlankLines: true, skipComments: true },
143
+ ],
144
+ 'max-params': ['error', 4],
145
+ 'max-statements': ['error', 30],
146
+ 'max-statements-per-line': ['error', { max: 1 }],
147
+ // === N RULES ===
81
148
  'n/no-unsupported-features/es-syntax': [
82
149
  'error',
83
150
  {
@@ -85,39 +152,94 @@ export const baseRules = {
85
152
  version: '>=18.0.0',
86
153
  },
87
154
  ],
155
+ 'new-cap': 'off', // Handled by @stylistic
156
+ 'no-alert': 'warn',
88
157
  'no-array-constructor': 'error',
158
+ // === POSSIBLE ERRORS ===
159
+ 'no-async-promise-executor': 'error',
89
160
  'no-await-in-loop': 'warn',
161
+ 'no-bitwise': 'error',
90
162
  'no-caller': 'warn',
91
- 'no-confusing-arrow': 'warn',
163
+ 'no-case-declarations': 'error',
164
+ 'no-compare-neg-zero': 'error',
165
+ 'no-cond-assign': 'error',
92
166
  'no-console': 'off',
93
- 'no-const-assign': 'warn',
94
- 'no-constant-binary-expression': 'error',
95
167
  'no-constant-condition': 'error',
168
+ 'no-constructor-return': 'error',
169
+ 'no-continue': 'error',
170
+ 'no-control-regex': 'error',
171
+ 'no-debugger': 'warn',
96
172
  'no-delete-var': 'warn',
97
- 'no-dupe-class-members': 'warn',
98
- 'no-dupe-keys': 'warn',
173
+ 'no-div-regex': 'error',
174
+ 'no-dupe-args': 'error',
175
+ 'no-dupe-keys': 'error',
176
+ 'no-duplicate-case': 'error',
99
177
  'no-duplicate-imports': 'error',
100
178
  'no-else-return': 'warn',
101
179
  'no-empty': 'off',
180
+ 'no-empty-character-class': 'error',
181
+ 'no-empty-function': 'off', // Handled by TypeScript rules
102
182
  'no-empty-pattern': 'off',
183
+ 'no-eq-null': 'error',
184
+ 'no-eval': 'error',
185
+ 'no-ex-assign': 'error',
186
+ 'no-extend-native': 'error',
103
187
  'no-extra-bind': 'warn',
104
- 'no-extra-parens': 'off',
105
- 'no-extra-semi': 'warn',
188
+ 'no-extra-boolean-cast': 'error',
189
+ 'no-extra-label': 'error',
190
+ 'no-extra-parens': 'off', // Handled by @stylistic
191
+ 'no-extra-semi': 'error',
192
+ 'no-fallthrough': 'error',
106
193
  'no-floating-decimal': 'warn',
194
+ 'no-func-assign': 'error',
195
+ 'no-global-assign': 'error',
107
196
  'no-implicit-coercion': [
108
197
  'error',
109
198
  { boolean: false, number: true, string: true },
110
199
  ],
200
+ 'no-implicit-globals': 'error',
201
+ 'no-implied-eval': 'error',
202
+ 'no-import-assign': 'error',
203
+ 'no-inner-declarations': 'error',
204
+ 'no-invalid-regexp': 'error',
205
+ 'no-invalid-this': 'off', // Handled by TypeScript rules
206
+ 'no-irregular-whitespace': 'error',
111
207
  'no-iterator': 'warn',
208
+ 'no-label-var': 'error',
209
+ 'no-label-var': 'error',
210
+ 'no-labels': 'error',
211
+ 'no-lone-blocks': 'error',
112
212
  'no-lonely-if': 'warn',
113
- 'no-mixed-spaces-and-tabs': ['warn', 'smart-tabs'],
213
+ 'no-loop-func': 'error',
214
+ 'no-loss-of-precision': 'error',
215
+
216
+ 'no-magic-numbers': 'off', // Handled by TypeScript rules
217
+ 'no-misleading-character-class': 'error',
218
+ 'no-mixed-operators': 'error',
219
+ 'no-multi-assign': 'error',
114
220
  'no-multi-str': 'warn',
221
+ 'no-new': 'error',
222
+ 'no-new-func': 'error',
115
223
  'no-new-object': 'error',
116
224
  'no-new-wrappers': 'warn',
117
- 'no-process-exit': 'off',
118
- 'no-promise-executor-return': ['error', { allowVoid: true }],
225
+
226
+ 'no-nonoctal-decimal-escape': 'error',
227
+ 'no-obj-calls': 'error',
228
+ 'no-octal': 'error',
229
+ 'no-octal-escape': 'error',
230
+ // === NO-ONLY-TESTS RULES ===
231
+ 'no-only-tests/no-only-tests': 'warn',
232
+ 'no-param-reassign': 'warn',
233
+ 'no-plusplus': 'off',
119
234
  'no-proto': 'warn',
235
+ 'no-prototype-builtins': 'error',
120
236
  'no-redeclare': 'warn',
237
+ 'no-regex-spaces': 'error',
238
+ 'no-restricted-exports': 'off',
239
+ 'no-restricted-globals': 'error',
240
+ 'no-restricted-globals': 'error',
241
+ 'no-restricted-imports': 'off',
242
+ 'no-restricted-properties': 'off',
121
243
  'no-restricted-syntax': [
122
244
  'warn',
123
245
  {
@@ -145,39 +267,75 @@ export const baseRules = {
145
267
  selector: "CallExpression[callee.property.name='forEach']",
146
268
  },
147
269
  ],
148
- 'no-shadow': 'off',
270
+ 'no-return-assign': 'error',
271
+ 'no-return-await': 'error',
272
+ 'no-script-url': 'error',
273
+ // === NO-SECRETS RULES ===
274
+ 'no-secrets/no-secrets': ['warn', { tolerance: 4.5 }],
275
+ 'no-self-assign': 'error',
276
+ 'no-self-compare': 'error',
277
+ 'no-sequences': 'error',
278
+ 'no-setter-return': 'error',
279
+ 'no-shadow': 'off', // Handled by TypeScript rules
149
280
  'no-shadow-restricted-names': 'warn',
150
- 'no-spaced-func': 'warn',
281
+ 'no-sparse-arrays': 'error',
282
+ 'no-template-curly-in-string': 'error',
151
283
  'no-this-before-super': 'warn',
284
+ 'no-throw-literal': 'error',
285
+ 'no-undef': 'error',
152
286
  'no-undef-init': 'warn',
287
+ 'no-undefined': 'off',
288
+ 'no-undefined': 'off',
153
289
  'no-underscore-dangle': 'off',
154
- 'no-unneeded-ternary': 'warn',
290
+
291
+ 'no-unexpected-multiline': 'error',
292
+ 'no-unmodified-loop-condition': 'error',
155
293
  'no-unreachable': 'error',
294
+ 'no-unreachable-loop': 'error',
295
+ 'no-unsafe-finally': 'error',
296
+ 'no-unsafe-negation': 'error',
156
297
  'no-unsafe-optional-chaining': 'error',
298
+ 'no-unused-expressions': 'error',
299
+ 'no-unused-labels': 'error',
157
300
  'no-unused-private-class-members': 'warn',
158
301
  'no-unused-vars': [
159
302
  'warn',
160
303
  {
161
304
  args: 'after-used',
305
+ argsIgnorePattern: '^_',
306
+ caughtErrors: 'all',
307
+ caughtErrorsIgnorePattern: '^_',
162
308
  ignoreRestSiblings: true,
309
+ vars: 'all',
310
+ varsIgnorePattern: '^_',
163
311
  },
164
312
  ],
313
+ 'no-use-before-define': 'off', // Handled by TypeScript rules
314
+ 'no-use-before-define': 'off', // Handled by TypeScript rules
315
+ 'no-useless-backreference': 'error',
165
316
  'no-useless-call': 'warn',
317
+ 'no-useless-catch': 'error',
166
318
  'no-useless-computed-key': 'warn',
167
319
  'no-useless-concat': 'warn',
168
320
  'no-useless-constructor': 'warn',
169
321
  'no-useless-escape': 'warn',
170
322
  'no-useless-rename': 'warn',
171
323
  'no-useless-return': 'warn',
172
- 'no-var': 'warn',
324
+ 'no-var': 'error',
325
+ 'no-void': 'error',
326
+ 'no-warning-comments': 'warn',
173
327
  'no-with': 'warn',
174
- 'object-curly-spacing': ['off', 'always'],
175
328
  'object-shorthand': 'warn',
329
+ 'one-var': ['error', 'never'],
330
+ 'one-var-declaration-per-line': ['error', 'always'],
331
+ 'operator-assignment': ['error', 'always'],
332
+ // === OPTIMIZE-REGEX RULES ===
176
333
  'optimize-regex/optimize-regex': 'warn',
334
+ // === PERFECTIONIST RULES ===
177
335
  'perfectionist/sort-named-imports': [
178
336
  'error',
179
337
  {
180
- 'ignore-case': true,
338
+ ignoreCase: true,
181
339
  order: 'asc',
182
340
  type: 'natural',
183
341
  },
@@ -186,107 +344,280 @@ export const baseRules = {
186
344
  'error',
187
345
  {
188
346
  order: 'asc',
189
- 'spread-last': true,
190
347
  type: 'natural',
191
348
  },
192
349
  ],
193
350
  'prefer-arrow-callback': 'warn',
194
351
  'prefer-const': 'warn',
195
- 'prefer-destructuring': [
196
- 'warn',
197
- {
198
- array: false,
199
- object: true,
200
- },
201
- ],
352
+ 'prefer-destructuring': ['warn', { array: false, object: true }],
353
+
202
354
  'prefer-exponentiation-operator': 'error',
355
+
356
+ 'prefer-named-capture-group': 'warn',
357
+
358
+ 'prefer-numeric-literals': 'error',
203
359
  'prefer-object-has-own': 'error',
360
+
361
+ 'prefer-promise-reject-errors': 'error',
362
+ 'prefer-regex-literals': 'error',
204
363
  'prefer-rest-params': 'warn',
364
+
205
365
  'prefer-spread': 'warn',
206
366
  'prefer-template': 'warn',
207
- 'prettier/prettier': ['warn', { parser: 'babel' }],
367
+ // === PROMISE RULES ===
368
+ 'promise/always-return': 'warn',
369
+ 'promise/avoid-new': 'off',
370
+ 'promise/catch-or-return': 'warn',
371
+ 'promise/no-callback-in-promise': 'warn',
372
+
208
373
  'promise/no-multiple-resolved': 'error',
209
374
  'promise/no-nesting': 'warn',
375
+ 'promise/no-new-statics': 'error',
376
+ 'promise/no-promise-in-callback': 'warn',
377
+ 'promise/no-return-in-finally': 'warn',
378
+
379
+ 'promise/no-return-wrap': 'warn',
380
+
381
+ 'promise/param-names': 'warn',
382
+
210
383
  'promise/prefer-await-to-callbacks': 'warn',
384
+
211
385
  'promise/prefer-await-to-then': 'warn',
212
- 'quote-props': ['warn', 'as-needed'],
213
- quotes: [
214
- 'off',
215
- 'single',
216
- {
217
- allowTemplateLiterals: true,
218
- avoidEscape: true,
219
- },
220
- ],
386
+
387
+ 'promise/valid-params': 'warn',
221
388
  radix: 'warn',
389
+
390
+ // === REGEXP RULES ===
222
391
  'regexp/no-missing-g-flag': 'error',
392
+ 'regexp/no-useless-flag': 'error',
393
+ 'regexp/prefer-d': 'error',
394
+ 'regexp/prefer-plus-quantifier': 'error',
395
+ 'regexp/prefer-question-quantifier': 'error',
396
+ 'regexp/prefer-star-quantifier': 'error',
223
397
  'require-atomic-updates': ['error', { allowProperties: false }],
224
- 'rest-spread-spacing': 'off',
398
+ 'require-await': 'off', // Handled by TypeScript rules
399
+ 'require-unicode-regexp': 'error',
400
+ 'require-yield': 'error',
401
+ // === SECURITY RULES ===
225
402
  'security/detect-buffer-noassert': 'error',
226
403
  'security/detect-child-process': 'warn',
227
404
  'security/detect-disable-mustache-escape': 'error',
405
+ 'security/detect-eval-with-expression': 'error',
406
+
407
+ 'security/detect-new-buffer': 'error',
408
+ 'security/detect-no-csrf-before-method-override': 'error',
228
409
  'security/detect-non-literal-fs-filename': 'error',
229
410
  'security/detect-non-literal-regexp': 'error',
230
411
  'security/detect-non-literal-require': 'error',
412
+ 'security/detect-object-injection': 'warn',
413
+
231
414
  'security/detect-possible-timing-attacks': 'error',
415
+ 'security/detect-pseudoRandomBytes': 'error',
232
416
  'security/detect-unsafe-regex': 'error',
233
- semi: 'off',
417
+ // === SIMPLE-IMPORT-SORT RULES ===
418
+ 'simple-import-sort/exports': 'error',
419
+ 'simple-import-sort/imports': 'error',
420
+ // === SONARJS RULES ===
421
+ 'sonarjs/cognitive-complexity': ['warn', 15],
422
+ 'sonarjs/max-switch-cases': ['warn', 10],
423
+ 'sonarjs/no-all-duplicated-branches': 'warn',
424
+ 'sonarjs/no-collapsible-if': 'warn',
425
+ 'sonarjs/no-collection-size-mischeck': 'warn',
426
+ 'sonarjs/no-duplicate-string': ['warn', { threshold: 5 }],
427
+ 'sonarjs/no-duplicated-branches': 'warn',
428
+ 'sonarjs/no-duplicated-keys': 'warn',
429
+
430
+ 'sonarjs/no-element-overwrite': 'warn',
431
+ 'sonarjs/no-extra-arguments': 'warn',
432
+
433
+ 'sonarjs/no-greedy-assertion': 'warn',
434
+ 'sonarjs/no-identical-conditions': 'warn',
435
+ 'sonarjs/no-identical-expressions': 'warn',
436
+ 'sonarjs/no-ignored-return': 'warn',
437
+ 'sonarjs/no-inverted-boolean-check': 'warn',
438
+ 'sonarjs/no-nested-switch': 'warn',
439
+ 'sonarjs/no-nested-template-literals': 'warn',
440
+ 'sonarjs/no-one-iteration-loop': 'warn',
441
+ 'sonarjs/no-redundant-boolean': 'warn',
442
+ 'sonarjs/no-redundant-jump': 'warn',
443
+ 'sonarjs/no-same-line-conditional': 'warn',
444
+ 'sonarjs/no-small-switch': 'warn',
445
+ 'sonarjs/no-unused-collection': 'warn',
446
+ 'sonarjs/no-use-of-empty-return-value': 'warn',
447
+ 'sonarjs/no-useless-catch': 'warn',
448
+ 'sonarjs/prefer-immediate-return': 'warn',
449
+ 'sonarjs/prefer-object-literal': 'warn',
450
+ 'sonarjs/prefer-single-boolean-return': 'warn',
451
+ 'sonarjs/prefer-while': 'warn',
452
+ // === SORT-DESTRUCTURE-KEYS RULES ===
234
453
  'sort-destructure-keys/sort-destructure-keys': 'warn',
235
- 'sort-imports': 'off',
454
+ 'sort-imports': 'off', // Handled by simple-import-sort
455
+ 'sort-keys': 'off', // Handled by perfectionist
236
456
  'sort-vars': 'warn',
237
- 'space-before-function-paren': [
238
- 'off',
239
- { anonymous: 'always', asyncArrow: 'always', named: 'never' },
240
- ],
241
- 'space-in-parens': ['off', 'never'],
242
- 'spaced-comment': [
243
- 'warn',
244
- 'always',
245
- {
246
- block: {
247
- balanced: true,
248
- exceptions: ['*'],
249
- markers: ['!'],
250
- },
251
- line: {
252
- exceptions: ['-', '+'],
253
- markers: ['/'],
254
- },
255
- },
256
- ],
257
- strict: ['warn', 'never'],
258
- 'unicode-bom': 'warn',
457
+ 'spaced-comment': ['warn', 'always'],
458
+ strict: ['error', 'never'],
459
+ 'symbol-description': 'error',
460
+ // === TESTING-LIBRARY RULES ===
461
+ 'testing-library/await-async-query': 'error',
462
+ 'testing-library/no-await-sync-query': 'error',
463
+ 'testing-library/no-debugging-utils': 'warn',
464
+
465
+ 'testing-library/no-dom-import': 'error',
466
+
467
+ 'testing-library/no-manual-cleanup': 'error',
468
+ 'testing-library/no-render-in-setup': 'error',
469
+ 'testing-library/no-unnecessary-act': 'error',
470
+ 'testing-library/prefer-explicit-assert': 'warn',
471
+ 'testing-library/prefer-find-by': 'error',
472
+ 'testing-library/prefer-presence-queries': 'error',
473
+ 'testing-library/prefer-query-by-disappearance': 'error',
474
+ 'testing-library/prefer-screen-queries': 'error',
475
+ 'testing-library/render-result-naming-convention': 'error',
476
+ // === UNICORN RULES ===
477
+ 'unicorn/better-regex': 'error',
259
478
  'unicorn/catch-error-name': ['error', { name: 'error' }],
479
+ 'unicorn/consistent-destructuring': 'error',
480
+ 'unicorn/consistent-function-scoping': 'error',
481
+
482
+ 'unicorn/custom-error-definition': 'error',
483
+ 'unicorn/empty-brace-spaces': 'error',
484
+ 'unicorn/error-message': 'error',
485
+ 'unicorn/escape-case': 'error',
486
+ 'unicorn/expiring-todo-comments': 'off',
487
+ 'unicorn/explicit-length-check': 'error',
260
488
  'unicorn/filename-case': [
261
- 'warn',
489
+ 'error',
262
490
  {
263
- cases: {
264
- camelCase: true,
265
- pascalCase: true,
266
- },
491
+ cases: { camelCase: true, pascalCase: true },
267
492
  ignore: ['.*.md'],
268
493
  },
269
494
  ],
270
- 'unicorn/import-index': 'warn',
495
+ 'unicorn/import-style': 'error',
496
+ 'unicorn/new-for-builtins': 'error',
497
+ 'unicorn/no-abusive-eslint-disable': 'error',
498
+ 'unicorn/no-array-callback-reference': 'off',
499
+ 'unicorn/no-array-for-each': 'error',
500
+ 'unicorn/no-array-method-this-argument': 'error',
501
+ 'unicorn/no-array-push-push': 'error',
502
+ 'unicorn/no-array-reduce': 'error',
503
+ 'unicorn/no-await-expression-member': 'error',
504
+ 'unicorn/no-console-spaces': 'error',
505
+ 'unicorn/no-document-cookie': 'error',
506
+ 'unicorn/no-empty-file': 'error',
507
+ 'unicorn/no-for-loop': 'error',
508
+ 'unicorn/no-hex-escape': 'error',
509
+ 'unicorn/no-instanceof-array': 'error',
510
+ 'unicorn/no-invalid-remove-event-listener': 'error',
511
+ 'unicorn/no-keyword-prefix': 'off',
512
+ 'unicorn/no-lonely-if': 'error',
513
+ 'unicorn/no-nested-ternary': 'error',
514
+ 'unicorn/no-new-array': 'error',
515
+ 'unicorn/no-new-buffer': 'error',
516
+ 'unicorn/no-null': 'off',
517
+ 'unicorn/no-object-as-default-parameter': 'error',
518
+ 'unicorn/no-process-exit': 'error',
519
+ 'unicorn/no-static-only-class': 'error',
520
+ 'unicorn/no-thenable': 'error',
521
+ 'unicorn/no-typeof-undefined': 'error',
522
+ 'unicorn/no-unnecessary-await': 'error',
523
+ 'unicorn/no-unreadable-array-destructuring': 'error',
524
+ 'unicorn/no-unreadable-iife': 'error',
525
+ 'unicorn/no-unused-properties': 'error',
526
+ 'unicorn/no-useless-fallback-in-spread': 'error',
527
+ 'unicorn/no-useless-length-check': 'error',
528
+ 'unicorn/no-useless-promise-resolve-reject': 'error',
529
+ 'unicorn/no-useless-spread': 'error',
271
530
  'unicorn/no-useless-undefined': ['error', { checkArguments: true }],
531
+ 'unicorn/no-zero-fractions': 'error',
532
+ 'unicorn/number-literal-case': 'error',
533
+ 'unicorn/numeric-separators-style': 'error',
534
+ 'unicorn/prefer-add-event-listener': 'error',
535
+ 'unicorn/prefer-array-find': 'error',
272
536
  'unicorn/prefer-array-flat': ['error', { functions: ['flatten'] }],
537
+ 'unicorn/prefer-array-flat-map': 'error',
538
+ 'unicorn/prefer-array-index-of': 'error',
539
+ 'unicorn/prefer-array-some': 'error',
273
540
  'unicorn/prefer-at': 'error',
274
541
  'unicorn/prefer-blob-reading-methods': 'error',
542
+ 'unicorn/prefer-code-point': 'error',
543
+ 'unicorn/prefer-date-now': 'error',
544
+ 'unicorn/prefer-default-parameters': 'error',
545
+ 'unicorn/prefer-dom-node-append': 'error',
546
+ 'unicorn/prefer-dom-node-dataset': 'error',
547
+ 'unicorn/prefer-dom-node-remove': 'error',
548
+ 'unicorn/prefer-dom-node-text-content': 'error',
549
+ 'unicorn/prefer-export-from': 'error',
550
+ 'unicorn/prefer-includes': 'error',
551
+ 'unicorn/prefer-json-parse-buffer': 'error',
552
+ 'unicorn/prefer-keyboard-event-key': 'error',
553
+ 'unicorn/prefer-logical-operator-over-ternary': 'error',
554
+ 'unicorn/prefer-math-trunc': 'error',
555
+ 'unicorn/prefer-modern-dom-apis': 'error',
556
+ 'unicorn/prefer-modern-math-apis': 'error',
557
+ 'unicorn/prefer-module': 'error',
558
+ 'unicorn/prefer-native-coercion-functions': 'error',
559
+ 'unicorn/prefer-negative-index': 'error',
560
+ 'unicorn/prefer-node-protocol': 'error',
561
+ 'unicorn/prefer-number-properties': 'error',
562
+ 'unicorn/prefer-object-from-entries': 'error',
563
+ 'unicorn/prefer-optional-catch-binding': 'error',
564
+ 'unicorn/prefer-prototype-methods': 'error',
565
+ 'unicorn/prefer-query-selector': 'error',
566
+ 'unicorn/prefer-reflect-apply': 'error',
567
+ 'unicorn/prefer-regexp-test': 'error',
568
+ 'unicorn/prefer-set-has': 'error',
569
+ 'unicorn/prefer-set-size': 'error',
570
+ 'unicorn/prefer-spread': 'error',
275
571
  'unicorn/prefer-string-replace-all': 'error',
276
572
  'unicorn/prefer-string-slice': 'error',
573
+ 'unicorn/prefer-string-starts-ends-with': 'error',
574
+ 'unicorn/prefer-string-trim-start-end': 'error',
575
+ 'unicorn/prefer-switch': 'error',
576
+ 'unicorn/prefer-ternary': 'error',
577
+ 'unicorn/prefer-top-level-await': 'error',
277
578
  'unicorn/prefer-type-error': 'error',
278
579
  'unicorn/prevent-abbreviations': [
279
580
  'warn',
280
581
  {
281
- allowList: {
282
- e2e: true,
283
- params: true,
284
- props: true,
285
- ref: true,
286
- },
582
+ allowList: { e2e: true, params: true, props: true, ref: true },
287
583
  ignore: [/e2e/],
288
584
  },
289
585
  ],
586
+ 'unicorn/relative-url-style': 'error',
587
+ 'unicorn/require-array-join-separator': 'error',
588
+ 'unicorn/require-number-to-fixed-digits-argument': 'error',
290
589
  'unicorn/require-post-message-target-origin': 'error',
590
+ 'unicorn/string-content': 'off',
591
+ 'unicorn/switch-case-braces': 'error',
592
+ 'unicorn/text-encoding-identifier-case': 'error',
593
+ 'unicorn/throw-new-error': 'error',
594
+ 'use-isnan': 'error',
595
+ 'valid-typeof': 'error',
596
+ 'vars-on-top': 'error',
597
+ // === WRITE-GOOD-COMMENTS RULES ===
291
598
  'write-good-comments/write-good-comments': 'warn',
599
+
600
+ 'yml/block-mapping': 'error',
601
+
602
+ // === YML RULES ===
603
+ 'yml/block-mapping-question-indicator-newline': 'error',
604
+ 'yml/block-sequence': 'error',
605
+ 'yml/block-sequence-hyphen-indicator-newline': 'error',
606
+ 'yml/flow-mapping-curly-newline': 'error',
607
+ 'yml/flow-mapping-curly-spacing': 'error',
608
+ 'yml/flow-sequence-bracket-newline': 'error',
609
+ 'yml/flow-sequence-bracket-spacing': 'error',
610
+ 'yml/indent': ['error', 2],
611
+ 'yml/key-spacing': 'error',
612
+ 'yml/no-empty-document': 'error',
613
+ 'yml/no-empty-key': 'error',
614
+ 'yml/no-empty-mapping-value': 'error',
615
+ 'yml/no-empty-sequence-entry': 'error',
616
+ 'yml/no-irregular-whitespace': 'error',
617
+ 'yml/no-tab-indent': 'error',
618
+ 'yml/quotes': ['warn', { avoidEscape: true, prefer: 'double' }],
619
+ 'yml/require-string-key': 'error',
620
+ 'yml/sort-keys': 'off',
621
+ 'yml/vue-custom-block/no-parsing-error': 'error',
622
+ yoda: 'error',
292
623
  };