@mikey-pro/eslint-config 8.1.0 → 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 -154
  4. package/overrides.js +200 -196
  5. package/package.json +57 -40
  6. package/rules.js +515 -202
package/rules.js CHANGED
@@ -1,61 +1,245 @@
1
+ // Modern ESLint rules for Mikey Pro
2
+ // Ultimate coding style guide for excellence
3
+
1
4
  export const baseRules = {
2
- camelcase: [
3
- 'error',
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 ===
12
+ 'boundaries/element-types': [
13
+ 'warn',
4
14
  {
5
- properties: 'never',
6
- ignoreDestructuring: true,
7
- ignoreImports: true,
8
- ignoreGlobals: true,
15
+ default: 'disallow',
16
+ rules: [
17
+ { allow: ['utils'], from: 'utils' },
18
+ { allow: ['features', 'shared', 'utils'], from: 'features' },
19
+ { allow: ['shared', 'utils'], from: 'shared' },
20
+ ],
9
21
  },
10
22
  ],
11
- 'class-methods-use-this': 'off',
12
- 'constructor-super': 'warn',
23
+ 'class-methods-use-this': 'off', // Handled by TypeScript rules
24
+ // === COMPAT RULES ===
25
+ 'compat/compat': 'warn',
26
+ complexity: ['error', { max: 15 }],
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',
13
35
  'dot-notation': 'warn',
14
- 'func-names': 'off',
15
- 'import/extensions': ['warn', 'ignorePackages', { ts: 'never' }],
16
- 'import/no-commonjs': 'off',
36
+ eqeqeq: ['error', 'always', { null: 'ignore' }],
37
+ 'filenames/match-exported': 'off',
38
+ // === FILENAMES RULES ===
39
+ 'filenames/match-regex': 'off',
40
+ 'filenames/no-index': 'off',
41
+ 'grouped-accessor-pairs': 'error',
42
+ 'guard-for-in': 'error',
43
+ // === IMPORT/EXPORT RULES ===
44
+ 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
17
45
  'import/default': 'off',
46
+ 'import/export': 'error',
47
+ 'import/extensions': [
48
+ 'error',
49
+ 'ignorePackages',
50
+ { ts: 'never', tsx: 'never' },
51
+ ],
52
+ 'import/first': 'error',
18
53
  'import/named': 'off',
19
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',
60
+ 'import/no-duplicates': ['error', { 'prefer-inline': true }],
61
+ 'import/no-dynamic-require': 'error',
62
+ 'import/no-empty-named-blocks': 'error',
63
+ 'import/no-extraneous-dependencies': [
64
+ 'error',
65
+ {
66
+ devDependencies: ['**/*.test.{js,ts}', '**/*.spec.{js,ts}', '**/test/**'],
67
+ },
68
+ ],
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',
20
73
  'import/no-named-as-default-member': 'off',
74
+ 'import/no-named-default': 'error',
75
+ 'import/no-namespace': 'error',
76
+ 'import/no-nodejs-modules': 'off',
77
+ 'import/no-relative-packages': 'error',
78
+ 'import/no-relative-parent-imports': [
79
+ 'error',
80
+ { ignore: ['@/components', '@/utils', '@/types'] },
81
+ ],
82
+ 'import/no-restricted-paths': 'off',
83
+ 'import/no-self-import': 'error',
84
+ 'import/no-unassigned-import': 'off',
21
85
  'import/no-unresolved': [
22
86
  'error',
23
87
  { amd: true, commonjs: true, ignore: ['^node:'] },
24
88
  ],
89
+ 'import/no-unused-modules': 'off',
90
+ 'import/no-useless-path-segments': 'error',
91
+ 'import/no-webpack-loader-syntax': 'error',
25
92
  'import/order': [
26
- 'warn',
93
+ 'error',
27
94
  {
28
- alphabetize: {
29
- order: 'asc',
30
- },
95
+ alphabetize: { order: 'asc' },
31
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'],
32
115
  },
33
116
  ],
34
- 'jsx-quotes': 'warn',
35
- 'keyword-spacing': 'warn',
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',
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 ===
148
+ 'n/no-unsupported-features/es-syntax': [
149
+ 'error',
150
+ {
151
+ ignores: ['modules', 'dynamicImport'],
152
+ version: '>=18.0.0',
153
+ },
154
+ ],
155
+ 'new-cap': 'off', // Handled by @stylistic
156
+ 'no-alert': 'warn',
157
+ 'no-array-constructor': 'error',
158
+ // === POSSIBLE ERRORS ===
159
+ 'no-async-promise-executor': 'error',
160
+ 'no-await-in-loop': 'warn',
161
+ 'no-bitwise': 'error',
36
162
  'no-caller': 'warn',
37
- 'no-confusing-arrow': 'warn',
163
+ 'no-case-declarations': 'error',
164
+ 'no-compare-neg-zero': 'error',
165
+ 'no-cond-assign': 'error',
38
166
  'no-console': 'off',
39
- 'no-const-assign': 'warn',
167
+ 'no-constant-condition': 'error',
168
+ 'no-constructor-return': 'error',
169
+ 'no-continue': 'error',
170
+ 'no-control-regex': 'error',
171
+ 'no-debugger': 'warn',
40
172
  'no-delete-var': 'warn',
41
- 'no-dupe-class-members': 'warn',
42
- 'no-dupe-keys': 'warn',
173
+ 'no-div-regex': 'error',
174
+ 'no-dupe-args': 'error',
175
+ 'no-dupe-keys': 'error',
176
+ 'no-duplicate-case': 'error',
43
177
  'no-duplicate-imports': 'error',
44
178
  'no-else-return': 'warn',
45
179
  'no-empty': 'off',
180
+ 'no-empty-character-class': 'error',
181
+ 'no-empty-function': 'off', // Handled by TypeScript rules
46
182
  'no-empty-pattern': 'off',
47
- 'no-extra-parens': 'off',
183
+ 'no-eq-null': 'error',
184
+ 'no-eval': 'error',
185
+ 'no-ex-assign': 'error',
186
+ 'no-extend-native': 'error',
48
187
  'no-extra-bind': 'warn',
49
- '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',
50
193
  'no-floating-decimal': 'warn',
194
+ 'no-func-assign': 'error',
195
+ 'no-global-assign': 'error',
196
+ 'no-implicit-coercion': [
197
+ 'error',
198
+ { boolean: false, number: true, string: true },
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',
51
207
  'no-iterator': 'warn',
208
+ 'no-label-var': 'error',
209
+ 'no-label-var': 'error',
210
+ 'no-labels': 'error',
211
+ 'no-lone-blocks': 'error',
52
212
  'no-lonely-if': 'warn',
53
- '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',
54
220
  'no-multi-str': 'warn',
221
+ 'no-new': 'error',
222
+ 'no-new-func': 'error',
223
+ 'no-new-object': 'error',
55
224
  'no-new-wrappers': 'warn',
56
- 'no-process-exit': 'off',
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',
57
234
  'no-proto': 'warn',
235
+ 'no-prototype-builtins': 'error',
58
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',
59
243
  'no-restricted-syntax': [
60
244
  'warn',
61
245
  {
@@ -74,237 +258,366 @@ export const baseRules = {
74
258
  selector: 'WithStatement',
75
259
  },
76
260
  {
77
- selector: "CallExpression[callee.property.name='reduce'][arguments.length<2]",
78
- message: 'Provide initialValue to reduce'
261
+ message: 'Provide initialValue to reduce',
262
+ selector:
263
+ "CallExpression[callee.property.name='reduce'][arguments.length<2]",
79
264
  },
80
265
  {
266
+ message: 'Use for...of instead',
81
267
  selector: "CallExpression[callee.property.name='forEach']",
82
- message: 'Use for...of instead'
83
- }
268
+ },
84
269
  ],
85
- '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
86
280
  'no-shadow-restricted-names': 'warn',
87
- 'no-spaced-func': 'warn',
281
+ 'no-sparse-arrays': 'error',
282
+ 'no-template-curly-in-string': 'error',
88
283
  'no-this-before-super': 'warn',
284
+ 'no-throw-literal': 'error',
285
+ 'no-undef': 'error',
89
286
  'no-undef-init': 'warn',
287
+ 'no-undefined': 'off',
288
+ 'no-undefined': 'off',
90
289
  'no-underscore-dangle': 'off',
91
- 'no-unneeded-ternary': 'warn',
290
+
291
+ 'no-unexpected-multiline': 'error',
292
+ 'no-unmodified-loop-condition': 'error',
293
+ 'no-unreachable': 'error',
294
+ 'no-unreachable-loop': 'error',
295
+ 'no-unsafe-finally': 'error',
296
+ 'no-unsafe-negation': 'error',
297
+ 'no-unsafe-optional-chaining': 'error',
298
+ 'no-unused-expressions': 'error',
299
+ 'no-unused-labels': 'error',
300
+ 'no-unused-private-class-members': 'warn',
92
301
  'no-unused-vars': [
93
302
  'warn',
94
303
  {
95
304
  args: 'after-used',
305
+ argsIgnorePattern: '^_',
306
+ caughtErrors: 'all',
307
+ caughtErrorsIgnorePattern: '^_',
96
308
  ignoreRestSiblings: true,
309
+ vars: 'all',
310
+ varsIgnorePattern: '^_',
97
311
  },
98
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',
99
316
  'no-useless-call': 'warn',
317
+ 'no-useless-catch': 'error',
100
318
  'no-useless-computed-key': 'warn',
101
319
  'no-useless-concat': 'warn',
102
320
  'no-useless-constructor': 'warn',
103
321
  'no-useless-escape': 'warn',
104
322
  'no-useless-rename': 'warn',
105
323
  'no-useless-return': 'warn',
106
- 'no-var': 'warn',
324
+ 'no-var': 'error',
325
+ 'no-void': 'error',
326
+ 'no-warning-comments': 'warn',
107
327
  'no-with': 'warn',
108
- 'object-curly-spacing': ['off', 'always'],
109
328
  'object-shorthand': 'warn',
110
- 'prefer-arrow-callback': 'warn',
111
- 'prefer-destructuring': [
112
- 'warn',
113
- {
114
- array: false,
115
- object: true,
116
- },
117
- ],
118
- 'prefer-rest-params': 'warn',
119
- 'prefer-spread': 'warn',
120
- 'prefer-template': 'warn',
121
- 'prefer-const': 'warn',
122
- 'quote-props': ['warn', 'as-needed'],
123
- quotes: [
124
- 'off',
125
- 'single',
126
- {
127
- allowTemplateLiterals: true,
128
- avoidEscape: true,
129
- },
130
- ],
131
- radix: 'warn',
132
- 'filenames/match-regex': 'off',
133
- 'require-atomic-updates': ['error', { allowProperties: false }],
134
- 'sort-imports': 'off',
135
- 'rest-spread-spacing': 'off',
136
- semi: 'off',
137
- 'sort-vars': 'warn',
138
- 'space-before-function-paren': [
139
- 'off',
140
- { anonymous: 'always', asyncArrow: 'always', named: 'never' },
141
- ],
142
- 'space-in-parens': ['off', 'never'],
143
- 'spaced-comment': [
144
- 'warn',
145
- 'always',
329
+ 'one-var': ['error', 'never'],
330
+ 'one-var-declaration-per-line': ['error', 'always'],
331
+ 'operator-assignment': ['error', 'always'],
332
+ // === OPTIMIZE-REGEX RULES ===
333
+ 'optimize-regex/optimize-regex': 'warn',
334
+ // === PERFECTIONIST RULES ===
335
+ 'perfectionist/sort-named-imports': [
336
+ 'error',
146
337
  {
147
- block: {
148
- balanced: true,
149
- exceptions: ['*'],
150
- markers: ['!'],
151
- },
152
- line: {
153
- exceptions: ['-', '+'],
154
- markers: ['/'],
155
- },
338
+ ignoreCase: true,
339
+ order: 'asc',
340
+ type: 'natural',
156
341
  },
157
342
  ],
158
- strict: ['warn', 'never'],
159
- 'unicode-bom': 'warn',
160
- 'unicorn/filename-case': [
161
- 'warn',
343
+ 'perfectionist/sort-objects': [
344
+ 'error',
162
345
  {
163
- cases: {
164
- camelCase: true,
165
- pascalCase: true,
166
- },
167
- ignore: ['.*.md'],
346
+ order: 'asc',
347
+ type: 'natural',
168
348
  },
169
349
  ],
170
- 'unicorn/prevent-abbreviations': [
171
- 'warn',
172
- {
173
- allowList: {
174
- e2e: true,
175
- props: true,
176
- ref: true,
177
- params: true
178
- },
179
- ignore: [/e2e/]
180
- }
181
- ],
182
- 'unicorn/import-index': 'warn',
183
- 'prettier/prettier': ['warn', { parser: 'babel' }],
350
+ 'prefer-arrow-callback': 'warn',
351
+ 'prefer-const': 'warn',
352
+ 'prefer-destructuring': ['warn', { array: false, object: true }],
184
353
 
185
- // Error handling
186
- 'no-await-in-loop': 'warn',
187
- 'no-promise-executor-return': ['error', { allowVoid: true }],
188
- 'no-unsafe-optional-chaining': 'error',
354
+ 'prefer-exponentiation-operator': 'error',
189
355
 
190
- // Modern practices
191
- 'logical-assignment-operators': ['warn', 'always', { enforceForIfStatements: true }],
192
- 'no-constant-binary-expression': 'error',
193
- 'no-unused-private-class-members': 'warn',
356
+ 'prefer-named-capture-group': 'warn',
194
357
 
195
- // Import rules
196
- 'import/consistent-type-specifier-style': ['error', 'prefer-top-level'],
197
- 'import/no-empty-named-blocks': 'error',
358
+ 'prefer-numeric-literals': 'error',
359
+ 'prefer-object-has-own': 'error',
360
+
361
+ 'prefer-promise-reject-errors': 'error',
362
+ 'prefer-regex-literals': 'error',
363
+ 'prefer-rest-params': 'warn',
364
+
365
+ 'prefer-spread': 'warn',
366
+ 'prefer-template': 'warn',
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',
198
372
 
199
- // Better promises
200
373
  'promise/no-multiple-resolved': 'error',
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
+
201
383
  'promise/prefer-await-to-callbacks': 'warn',
202
384
 
203
- // Security
204
- 'security/detect-non-literal-fs-filename': 'error',
205
- 'security/detect-unsafe-regex': 'error',
385
+ 'promise/prefer-await-to-then': 'warn',
386
+
387
+ 'promise/valid-params': 'warn',
388
+ radix: 'warn',
389
+
390
+ // === REGEXP RULES ===
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',
397
+ 'require-atomic-updates': ['error', { allowProperties: false }],
398
+ 'require-await': 'off', // Handled by TypeScript rules
399
+ 'require-unicode-regexp': 'error',
400
+ 'require-yield': 'error',
401
+ // === SECURITY RULES ===
206
402
  'security/detect-buffer-noassert': 'error',
207
403
  'security/detect-child-process': 'warn',
208
404
  'security/detect-disable-mustache-escape': 'error',
209
- 'security/detect-possible-timing-attacks': 'error',
405
+ 'security/detect-eval-with-expression': 'error',
406
+
407
+ 'security/detect-new-buffer': 'error',
408
+ 'security/detect-no-csrf-before-method-override': 'error',
409
+ 'security/detect-non-literal-fs-filename': 'error',
210
410
  'security/detect-non-literal-regexp': 'error',
211
411
  'security/detect-non-literal-require': 'error',
412
+ 'security/detect-object-injection': 'warn',
212
413
 
213
- 'no-unreachable': 'error',
214
- 'no-constant-condition': 'error',
215
- 'complexity': ['error', { max: 15 }],
216
-
217
- // RegExp
218
- 'regexp/no-missing-g-flag': 'error',
219
-
220
- // Enhanced TypeScript
221
- 'etc/prefer-interface': 'error',
414
+ 'security/detect-possible-timing-attacks': 'error',
415
+ 'security/detect-pseudoRandomBytes': 'error',
416
+ 'security/detect-unsafe-regex': 'error',
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',
222
429
 
223
- // Enhanced Import Rules
224
- 'import/no-relative-parent-imports': ['error', {
225
- ignore: ['@/components', '@/utils', '@/types']
226
- }],
227
- 'import/no-extraneous-dependencies': ['error', {
228
- devDependencies: ['**/*.test.{js,ts}', '**/*.spec.{js,ts}', '**/test/**']
229
- }],
430
+ 'sonarjs/no-element-overwrite': 'warn',
431
+ 'sonarjs/no-extra-arguments': 'warn',
230
432
 
231
- // Better Promise Handling
232
- 'promise/no-nesting': 'warn',
233
- 'promise/prefer-await-to-then': 'warn',
234
-
235
- // Code Organization
236
- 'typescript-sort-keys/interface': 'warn',
237
- 'typescript-sort-keys/string-enum': 'warn',
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 ===
238
453
  'sort-destructure-keys/sort-destructure-keys': 'warn',
454
+ 'sort-imports': 'off', // Handled by simple-import-sort
455
+ 'sort-keys': 'off', // Handled by perfectionist
456
+ 'sort-vars': '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',
239
464
 
240
- // Code Quality
241
- 'write-good-comments/write-good-comments': 'warn',
465
+ 'testing-library/no-dom-import': 'error',
242
466
 
243
- // Import Safety
244
- 'import/no-cycle': ['error', {
245
- maxDepth: 1,
246
- ignoreExternal: true
247
- }],
248
- 'import/no-relative-packages': 'error',
249
- 'import/no-self-import': 'error',
250
- 'import/no-namespace': 'error',
251
- 'import/no-duplicates': ['error', { 'prefer-inline': true }],
252
- 'import/no-import-module-exports': 'error',
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',
478
+ 'unicorn/catch-error-name': ['error', { name: 'error' }],
479
+ 'unicorn/consistent-destructuring': 'error',
480
+ 'unicorn/consistent-function-scoping': 'error',
253
481
 
254
- // Architecture Boundaries
255
- 'boundaries/element-types': [
256
- 'warn',
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',
488
+ 'unicorn/filename-case': [
489
+ 'error',
257
490
  {
258
- default: 'disallow',
259
- rules: [
260
- { from: 'utils', allow: ['utils'] },
261
- { from: 'features', allow: ['features', 'shared', 'utils'] },
262
- { from: 'shared', allow: ['shared', 'utils'] }
263
- ]
264
- }
491
+ cases: { camelCase: true, pascalCase: true },
492
+ ignore: ['.*.md'],
493
+ },
265
494
  ],
266
-
267
- // Performance
268
- 'optimize-regex/optimize-regex': 'warn',
269
-
270
- // Enhanced Security
271
- 'n/no-unsupported-features/es-syntax': ['error', {
272
- version: '>=18.0.0',
273
- ignores: ['modules', 'dynamicImport']
274
- }],
275
-
276
- // Modern JavaScript Features
277
- 'prefer-object-has-own': 'error',
278
- 'unicorn/prefer-string-slice': 'error',
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',
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',
279
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',
540
+ 'unicorn/prefer-at': 'error',
280
541
  'unicorn/prefer-blob-reading-methods': 'error',
281
-
282
- // Memory Optimizations
283
- 'no-array-constructor': 'error',
284
- 'no-new-object': 'error',
285
- 'prefer-exponentiation-operator': 'error',
286
-
287
- // Better Error Handling
288
- 'max-classes-per-file': ['error', 1],
289
- 'unicorn/catch-error-name': ['error', { name: 'error' }],
290
- 'unicorn/no-useless-undefined': ['error', { checkArguments: true }],
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',
571
+ 'unicorn/prefer-string-replace-all': 'error',
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',
291
578
  'unicorn/prefer-type-error': 'error',
579
+ 'unicorn/prevent-abbreviations': [
580
+ 'warn',
581
+ {
582
+ allowList: { e2e: true, params: true, props: true, ref: true },
583
+ ignore: [/e2e/],
584
+ },
585
+ ],
586
+ 'unicorn/relative-url-style': 'error',
587
+ 'unicorn/require-array-join-separator': 'error',
588
+ 'unicorn/require-number-to-fixed-digits-argument': 'error',
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 ===
598
+ 'write-good-comments/write-good-comments': 'warn',
292
599
 
293
- // Code Style
294
- 'perfectionist/sort-named-imports': ['error', {
295
- type: 'natural',
296
- order: 'asc',
297
- 'ignore-case': true
298
- }],
299
- 'perfectionist/sort-objects': ['error', {
300
- type: 'natural',
301
- order: 'asc',
302
- 'spread-last': true
303
- }],
600
+ 'yml/block-mapping': 'error',
304
601
 
305
- // Advanced Performance
306
- 'no-implicit-coercion': ['error', { boolean: false, number: true, string: true }],
307
- 'unicorn/prefer-at': 'error',
308
- 'unicorn/prefer-string-replace-all': 'error',
309
- 'unicorn/require-post-message-target-origin': 'error'
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',
310
623
  };