@egy186/eslint-config 3.1.0 → 3.2.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.
package/dist/base.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ESLint, Linter } from 'eslint';
1
+ import type { Linter } from 'eslint';
2
2
  import nPlugin from 'eslint-plugin-n';
3
3
  declare const config: {
4
4
  readonly files: ["**/*.{js,jsx,mjs}", "**/*.{ts,tsx,mts}"];
@@ -153,13 +153,41 @@ declare const config: {
153
153
  readonly plugins: {
154
154
  readonly '@stylistic': {
155
155
  rules: import("@stylistic/eslint-plugin").Rules;
156
- configs: ESLint.Plugin["configs"] & import("@stylistic/eslint-plugin").Configs;
156
+ configs: import("eslint").ESLint.Plugin["configs"] & import("@stylistic/eslint-plugin").Configs;
157
157
  };
158
- readonly import: ESLint.Plugin;
159
- readonly jsdoc: ESLint.Plugin & {
158
+ readonly import: import("eslint").ESLint.Plugin & {
159
+ meta: {
160
+ name: string;
161
+ version: string;
162
+ };
163
+ configs: {
164
+ "recommended": Linter.LegacyConfig;
165
+ "errors": Linter.LegacyConfig;
166
+ "warnings": Linter.LegacyConfig;
167
+ "stage-0": Linter.LegacyConfig;
168
+ "react": Linter.LegacyConfig;
169
+ "react-native": Linter.LegacyConfig;
170
+ "electron": Linter.LegacyConfig;
171
+ "typescript": Linter.LegacyConfig;
172
+ };
173
+ flatConfigs: {
174
+ "recommended": Linter.FlatConfig;
175
+ "errors": Linter.FlatConfig;
176
+ "warnings": Linter.FlatConfig;
177
+ "stage-0": Linter.FlatConfig;
178
+ "react": Linter.FlatConfig;
179
+ "react-native": Linter.FlatConfig;
180
+ "electron": Linter.FlatConfig;
181
+ "typescript": Linter.FlatConfig;
182
+ };
183
+ rules: {
184
+ [key: string]: import("eslint").Rule.RuleModule;
185
+ };
186
+ };
187
+ readonly jsdoc: import("eslint").ESLint.Plugin & {
160
188
  configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
161
189
  };
162
- readonly n: ESLint.Plugin & {
190
+ readonly n: import("eslint").ESLint.Plugin & {
163
191
  configs: nPlugin.Configs;
164
192
  };
165
193
  };
@@ -189,7 +217,6 @@ declare const config: {
189
217
  readonly '@stylistic/curly-newline': ["error", "always"];
190
218
  readonly '@stylistic/dot-location': ["error", "property"];
191
219
  readonly '@stylistic/eol-last': "error";
192
- readonly '@stylistic/func-call-spacing': ["error", "never"];
193
220
  readonly '@stylistic/function-call-argument-newline': ["error", "consistent"];
194
221
  readonly '@stylistic/function-call-spacing': ["error", "never"];
195
222
  readonly '@stylistic/function-paren-newline': ["error", "multiline"];
@@ -212,7 +239,6 @@ declare const config: {
212
239
  readonly '@stylistic/jsx-equals-spacing': "error";
213
240
  readonly '@stylistic/jsx-first-prop-new-line': "error";
214
241
  readonly '@stylistic/jsx-function-call-newline': "error";
215
- readonly '@stylistic/jsx-indent': "off";
216
242
  readonly '@stylistic/jsx-indent-props': ["error", 2];
217
243
  readonly '@stylistic/jsx-max-props-per-line': "error";
218
244
  readonly '@stylistic/jsx-newline': "off";
@@ -274,7 +300,9 @@ declare const config: {
274
300
  readonly '@stylistic/padded-blocks': ["error", "never"];
275
301
  readonly '@stylistic/padding-line-between-statements': "error";
276
302
  readonly '@stylistic/quote-props': ["error", "as-needed"];
277
- readonly '@stylistic/quotes': ["error", "single", "avoid-escape"];
303
+ readonly '@stylistic/quotes': ["error", "single", {
304
+ readonly avoidEscape: true;
305
+ }];
278
306
  readonly '@stylistic/rest-spread-spacing': ["error", "never"];
279
307
  readonly '@stylistic/semi': ["error", "always"];
280
308
  readonly '@stylistic/semi-spacing': ["error", {
@@ -415,6 +443,7 @@ declare const config: {
415
443
  readonly 'import/consistent-type-specifier-style': "error";
416
444
  readonly 'import/default': "error";
417
445
  readonly 'import/dynamic-import-chunkname': "off";
446
+ readonly 'import/enforce-node-protocol-usage': ["error", "always"];
418
447
  readonly 'import/export': "error";
419
448
  readonly 'import/exports-last': "error";
420
449
  readonly 'import/extensions': ["error", "ignorePackages", {
@@ -437,7 +466,7 @@ declare const config: {
437
466
  readonly 'import/no-cycle': "error";
438
467
  readonly 'import/no-default-export': "off";
439
468
  readonly 'import/no-deprecated': "error";
440
- readonly 'import/no-duplicates': "error";
469
+ readonly 'import/no-duplicates': "off";
441
470
  readonly 'import/no-dynamic-require': "error";
442
471
  readonly 'import/no-empty-named-blocks': "error";
443
472
  readonly 'import/no-extraneous-dependencies': "off";
@@ -462,7 +491,6 @@ declare const config: {
462
491
  readonly 'import/order': "off";
463
492
  readonly 'import/prefer-default-export': "error";
464
493
  readonly 'import/unambiguous': "error";
465
- readonly 'no-duplicate-imports': "off";
466
494
  readonly 'unicode-bom': ["error", string];
467
495
  readonly 'accessor-pairs': "error";
468
496
  readonly 'arrow-body-style': ["error", string];
@@ -634,6 +662,10 @@ declare const config: {
634
662
  readonly 'no-dupe-else-if': "error";
635
663
  readonly 'no-dupe-keys': "error";
636
664
  readonly 'no-duplicate-case': "error";
665
+ readonly 'no-duplicate-imports': ["error", {
666
+ allowSeparateTypeImports: boolean;
667
+ includeExports: boolean;
668
+ }];
637
669
  readonly 'no-empty-character-class': "error";
638
670
  readonly 'no-empty-pattern': "error";
639
671
  readonly 'no-ex-assign': "error";
package/dist/base.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import eslintRules from './rules/eslint-rules.js';
2
2
  import globals from 'globals';
3
- // @ts-expect-error TS7016
4
3
  import importPlugin from 'eslint-plugin-import';
5
4
  import importRules from './rules/import-rules.js';
6
5
  import jsdoc from 'eslint-plugin-jsdoc';
package/dist/browser.d.ts CHANGED
@@ -90,6 +90,7 @@ declare const config: {
90
90
  readonly clearTimeout: false;
91
91
  readonly clientInformation: false;
92
92
  readonly Clipboard: false;
93
+ readonly ClipboardChangeEvent: false;
93
94
  readonly ClipboardEvent: false;
94
95
  readonly ClipboardItem: false;
95
96
  readonly close: false;
@@ -112,6 +113,7 @@ declare const config: {
112
113
  readonly CookieStoreManager: false;
113
114
  readonly CountQueuingStrategy: false;
114
115
  readonly createImageBitmap: false;
116
+ readonly CreateMonitor: false;
115
117
  readonly Credential: false;
116
118
  readonly credentialless: false;
117
119
  readonly CredentialsContainer: false;
@@ -450,6 +452,7 @@ declare const config: {
450
452
  readonly InputDeviceCapabilities: false;
451
453
  readonly InputDeviceInfo: false;
452
454
  readonly InputEvent: false;
455
+ readonly IntegrityViolationReportBody: false;
453
456
  readonly IntersectionObserver: false;
454
457
  readonly IntersectionObserverEntry: false;
455
458
  readonly isSecureContext: false;
@@ -765,6 +768,7 @@ declare const config: {
765
768
  readonly PushSubscriptionOptions: false;
766
769
  readonly queryLocalFonts: false;
767
770
  readonly queueMicrotask: false;
771
+ readonly QuotaExceededError: false;
768
772
  readonly RadioNodeList: false;
769
773
  readonly Range: false;
770
774
  readonly ReadableByteStreamController: false;
@@ -888,6 +892,7 @@ declare const config: {
888
892
  readonly SubmitEvent: false;
889
893
  readonly Subscriber: false;
890
894
  readonly SubtleCrypto: false;
895
+ readonly Summarizer: false;
891
896
  readonly SuppressedError: false;
892
897
  readonly SVGAElement: false;
893
898
  readonly SVGAngle: false;
@@ -1018,6 +1023,7 @@ declare const config: {
1018
1023
  readonly TransformStream: false;
1019
1024
  readonly TransformStreamDefaultController: false;
1020
1025
  readonly TransitionEvent: false;
1026
+ readonly Translator: false;
1021
1027
  readonly TreeWalker: false;
1022
1028
  readonly TrustedHTML: false;
1023
1029
  readonly TrustedScript: false;
@@ -1049,6 +1055,8 @@ declare const config: {
1049
1055
  readonly VideoEncoder: false;
1050
1056
  readonly VideoFrame: false;
1051
1057
  readonly VideoPlaybackQuality: false;
1058
+ readonly viewport: false;
1059
+ readonly Viewport: false;
1052
1060
  readonly ViewTimeline: false;
1053
1061
  readonly ViewTransition: false;
1054
1062
  readonly ViewTransitionTypeSet: false;
@@ -1244,7 +1252,6 @@ declare const config: {
1244
1252
  readonly '@stylistic/curly-newline': ["error", "always"];
1245
1253
  readonly '@stylistic/dot-location': ["error", "property"];
1246
1254
  readonly '@stylistic/eol-last': "error";
1247
- readonly '@stylistic/func-call-spacing': ["error", "never"];
1248
1255
  readonly '@stylistic/function-call-argument-newline': ["error", "consistent"];
1249
1256
  readonly '@stylistic/function-call-spacing': ["error", "never"];
1250
1257
  readonly '@stylistic/function-paren-newline': ["error", "multiline"];
@@ -1267,7 +1274,6 @@ declare const config: {
1267
1274
  readonly '@stylistic/jsx-equals-spacing': "error";
1268
1275
  readonly '@stylistic/jsx-first-prop-new-line': "error";
1269
1276
  readonly '@stylistic/jsx-function-call-newline': "error";
1270
- readonly '@stylistic/jsx-indent': "off";
1271
1277
  readonly '@stylistic/jsx-indent-props': ["error", 2];
1272
1278
  readonly '@stylistic/jsx-max-props-per-line': "error";
1273
1279
  readonly '@stylistic/jsx-newline': "off";
@@ -1329,7 +1335,9 @@ declare const config: {
1329
1335
  readonly '@stylistic/padded-blocks': ["error", "never"];
1330
1336
  readonly '@stylistic/padding-line-between-statements': "error";
1331
1337
  readonly '@stylistic/quote-props': ["error", "as-needed"];
1332
- readonly '@stylistic/quotes': ["error", "single", "avoid-escape"];
1338
+ readonly '@stylistic/quotes': ["error", "single", {
1339
+ readonly avoidEscape: true;
1340
+ }];
1333
1341
  readonly '@stylistic/rest-spread-spacing': ["error", "never"];
1334
1342
  readonly '@stylistic/semi': ["error", "always"];
1335
1343
  readonly '@stylistic/semi-spacing': ["error", {
@@ -1467,6 +1475,7 @@ declare const config: {
1467
1475
  readonly 'import/consistent-type-specifier-style': "error";
1468
1476
  readonly 'import/default': "error";
1469
1477
  readonly 'import/dynamic-import-chunkname': "off";
1478
+ readonly 'import/enforce-node-protocol-usage': ["error", "always"];
1470
1479
  readonly 'import/export': "error";
1471
1480
  readonly 'import/exports-last': "error";
1472
1481
  readonly 'import/extensions': ["error", "ignorePackages", {
@@ -1489,7 +1498,7 @@ declare const config: {
1489
1498
  readonly 'import/no-cycle': "error";
1490
1499
  readonly 'import/no-default-export': "off";
1491
1500
  readonly 'import/no-deprecated': "error";
1492
- readonly 'import/no-duplicates': "error";
1501
+ readonly 'import/no-duplicates': "off";
1493
1502
  readonly 'import/no-dynamic-require': "error";
1494
1503
  readonly 'import/no-empty-named-blocks': "error";
1495
1504
  readonly 'import/no-extraneous-dependencies': "off";
@@ -1513,7 +1522,6 @@ declare const config: {
1513
1522
  readonly 'import/order': "off";
1514
1523
  readonly 'import/prefer-default-export': "error";
1515
1524
  readonly 'import/unambiguous': "error";
1516
- readonly 'no-duplicate-imports': "off";
1517
1525
  readonly 'unicode-bom': ["error", string];
1518
1526
  readonly 'accessor-pairs': "error";
1519
1527
  readonly 'arrow-body-style': ["error", string];
@@ -1685,6 +1693,10 @@ declare const config: {
1685
1693
  readonly 'no-dupe-else-if': "error";
1686
1694
  readonly 'no-dupe-keys': "error";
1687
1695
  readonly 'no-duplicate-case': "error";
1696
+ readonly 'no-duplicate-imports': ["error", {
1697
+ allowSeparateTypeImports: boolean;
1698
+ includeExports: boolean;
1699
+ }];
1688
1700
  readonly 'no-empty-character-class': "error";
1689
1701
  readonly 'no-empty-pattern': "error";
1690
1702
  readonly 'no-ex-assign': "error";
@@ -1736,7 +1748,35 @@ declare const config: {
1736
1748
  rules: import("@stylistic/eslint-plugin").Rules;
1737
1749
  configs: import("eslint").ESLint.Plugin["configs"] & import("@stylistic/eslint-plugin").Configs;
1738
1750
  };
1739
- readonly import: import("eslint").ESLint.Plugin;
1751
+ readonly import: import("eslint").ESLint.Plugin & {
1752
+ meta: {
1753
+ name: string;
1754
+ version: string;
1755
+ };
1756
+ configs: {
1757
+ "recommended": Linter.LegacyConfig;
1758
+ "errors": Linter.LegacyConfig;
1759
+ "warnings": Linter.LegacyConfig;
1760
+ "stage-0": Linter.LegacyConfig;
1761
+ "react": Linter.LegacyConfig;
1762
+ "react-native": Linter.LegacyConfig;
1763
+ "electron": Linter.LegacyConfig;
1764
+ "typescript": Linter.LegacyConfig;
1765
+ };
1766
+ flatConfigs: {
1767
+ "recommended": Linter.FlatConfig;
1768
+ "errors": Linter.FlatConfig;
1769
+ "warnings": Linter.FlatConfig;
1770
+ "stage-0": Linter.FlatConfig;
1771
+ "react": Linter.FlatConfig;
1772
+ "react-native": Linter.FlatConfig;
1773
+ "electron": Linter.FlatConfig;
1774
+ "typescript": Linter.FlatConfig;
1775
+ };
1776
+ rules: {
1777
+ [key: string]: import("eslint").Rule.RuleModule;
1778
+ };
1779
+ };
1740
1780
  readonly jsdoc: import("eslint").ESLint.Plugin & {
1741
1781
  configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
1742
1782
  };
@@ -171,7 +171,6 @@ declare const config: {
171
171
  readonly '@stylistic/curly-newline': ["error", "always"];
172
172
  readonly '@stylistic/dot-location': ["error", "property"];
173
173
  readonly '@stylistic/eol-last': "error";
174
- readonly '@stylistic/func-call-spacing': ["error", "never"];
175
174
  readonly '@stylistic/function-call-argument-newline': ["error", "consistent"];
176
175
  readonly '@stylistic/function-call-spacing': ["error", "never"];
177
176
  readonly '@stylistic/function-paren-newline': ["error", "multiline"];
@@ -194,7 +193,6 @@ declare const config: {
194
193
  readonly '@stylistic/jsx-equals-spacing': "error";
195
194
  readonly '@stylistic/jsx-first-prop-new-line': "error";
196
195
  readonly '@stylistic/jsx-function-call-newline': "error";
197
- readonly '@stylistic/jsx-indent': "off";
198
196
  readonly '@stylistic/jsx-indent-props': ["error", 2];
199
197
  readonly '@stylistic/jsx-max-props-per-line': "error";
200
198
  readonly '@stylistic/jsx-newline': "off";
@@ -256,7 +254,9 @@ declare const config: {
256
254
  readonly '@stylistic/padded-blocks': ["error", "never"];
257
255
  readonly '@stylistic/padding-line-between-statements': "error";
258
256
  readonly '@stylistic/quote-props': ["error", "as-needed"];
259
- readonly '@stylistic/quotes': ["error", "single", "avoid-escape"];
257
+ readonly '@stylistic/quotes': ["error", "single", {
258
+ readonly avoidEscape: true;
259
+ }];
260
260
  readonly '@stylistic/rest-spread-spacing': ["error", "never"];
261
261
  readonly '@stylistic/semi': ["error", "always"];
262
262
  readonly '@stylistic/semi-spacing': ["error", {
@@ -397,6 +397,7 @@ declare const config: {
397
397
  readonly 'import/consistent-type-specifier-style': "error";
398
398
  readonly 'import/default': "error";
399
399
  readonly 'import/dynamic-import-chunkname': "off";
400
+ readonly 'import/enforce-node-protocol-usage': ["error", "always"];
400
401
  readonly 'import/export': "error";
401
402
  readonly 'import/exports-last': "error";
402
403
  readonly 'import/extensions': ["error", "ignorePackages", {
@@ -419,7 +420,7 @@ declare const config: {
419
420
  readonly 'import/no-cycle': "error";
420
421
  readonly 'import/no-default-export': "off";
421
422
  readonly 'import/no-deprecated': "error";
422
- readonly 'import/no-duplicates': "error";
423
+ readonly 'import/no-duplicates': "off";
423
424
  readonly 'import/no-dynamic-require': "error";
424
425
  readonly 'import/no-empty-named-blocks': "error";
425
426
  readonly 'import/no-extraneous-dependencies': "off";
@@ -444,7 +445,6 @@ declare const config: {
444
445
  readonly 'import/order': "off";
445
446
  readonly 'import/prefer-default-export': "error";
446
447
  readonly 'import/unambiguous': "error";
447
- readonly 'no-duplicate-imports': "off";
448
448
  readonly 'unicode-bom': ["error", string];
449
449
  readonly 'accessor-pairs': "error";
450
450
  readonly 'arrow-body-style': ["error", string];
@@ -616,6 +616,10 @@ declare const config: {
616
616
  readonly 'no-dupe-else-if': "error";
617
617
  readonly 'no-dupe-keys': "error";
618
618
  readonly 'no-duplicate-case': "error";
619
+ readonly 'no-duplicate-imports': ["error", {
620
+ allowSeparateTypeImports: boolean;
621
+ includeExports: boolean;
622
+ }];
619
623
  readonly 'no-empty-character-class': "error";
620
624
  readonly 'no-empty-pattern': "error";
621
625
  readonly 'no-ex-assign': "error";
@@ -666,7 +670,35 @@ declare const config: {
666
670
  rules: import("@stylistic/eslint-plugin").Rules;
667
671
  configs: import("eslint").ESLint.Plugin["configs"] & import("@stylistic/eslint-plugin").Configs;
668
672
  };
669
- readonly import: import("eslint").ESLint.Plugin;
673
+ readonly import: import("eslint").ESLint.Plugin & {
674
+ meta: {
675
+ name: string;
676
+ version: string;
677
+ };
678
+ configs: {
679
+ "recommended": Linter.LegacyConfig;
680
+ "errors": Linter.LegacyConfig;
681
+ "warnings": Linter.LegacyConfig;
682
+ "stage-0": Linter.LegacyConfig;
683
+ "react": Linter.LegacyConfig;
684
+ "react-native": Linter.LegacyConfig;
685
+ "electron": Linter.LegacyConfig;
686
+ "typescript": Linter.LegacyConfig;
687
+ };
688
+ flatConfigs: {
689
+ "recommended": Linter.FlatConfig;
690
+ "errors": Linter.FlatConfig;
691
+ "warnings": Linter.FlatConfig;
692
+ "stage-0": Linter.FlatConfig;
693
+ "react": Linter.FlatConfig;
694
+ "react-native": Linter.FlatConfig;
695
+ "electron": Linter.FlatConfig;
696
+ "typescript": Linter.FlatConfig;
697
+ };
698
+ rules: {
699
+ [key: string]: import("eslint").Rule.RuleModule;
700
+ };
701
+ };
670
702
  readonly jsdoc: import("eslint").ESLint.Plugin & {
671
703
  configs: Record<`flat/${import("eslint-plugin-jsdoc").ConfigGroups}${import("eslint-plugin-jsdoc").ConfigVariants}${import("eslint-plugin-jsdoc").ErrorLevelVariants}`, import("eslint").Linter.Config>;
672
704
  };
@@ -170,7 +170,10 @@ declare const rules: {
170
170
  readonly 'no-dupe-else-if': "error";
171
171
  readonly 'no-dupe-keys': "error";
172
172
  readonly 'no-duplicate-case': "error";
173
- readonly 'no-duplicate-imports': "error";
173
+ readonly 'no-duplicate-imports': ["error", {
174
+ allowSeparateTypeImports: boolean;
175
+ includeExports: boolean;
176
+ }];
174
177
  readonly 'no-empty-character-class': "error";
175
178
  readonly 'no-empty-pattern': "error";
176
179
  readonly 'no-ex-assign': "error";
@@ -22,7 +22,13 @@ const rules = {
22
22
  'no-dupe-else-if': 'error',
23
23
  'no-dupe-keys': 'error',
24
24
  'no-duplicate-case': 'error',
25
- 'no-duplicate-imports': 'error',
25
+ 'no-duplicate-imports': [
26
+ 'error',
27
+ {
28
+ allowSeparateTypeImports: true,
29
+ includeExports: true
30
+ }
31
+ ],
26
32
  'no-empty-character-class': 'error',
27
33
  'no-empty-pattern': 'error',
28
34
  'no-ex-assign': 'error',
@@ -2,6 +2,7 @@ declare const rules: {
2
2
  readonly 'import/consistent-type-specifier-style': "error";
3
3
  readonly 'import/default': "error";
4
4
  readonly 'import/dynamic-import-chunkname': "off";
5
+ readonly 'import/enforce-node-protocol-usage': ["error", "always"];
5
6
  readonly 'import/export': "error";
6
7
  readonly 'import/exports-last': "error";
7
8
  readonly 'import/extensions': ["error", "ignorePackages", {
@@ -24,7 +25,7 @@ declare const rules: {
24
25
  readonly 'import/no-cycle': "error";
25
26
  readonly 'import/no-default-export': "off";
26
27
  readonly 'import/no-deprecated': "error";
27
- readonly 'import/no-duplicates': "error";
28
+ readonly 'import/no-duplicates': "off";
28
29
  readonly 'import/no-dynamic-require': "error";
29
30
  readonly 'import/no-empty-named-blocks': "error";
30
31
  readonly 'import/no-extraneous-dependencies': "off";
@@ -49,6 +50,5 @@ declare const rules: {
49
50
  readonly 'import/order': "off";
50
51
  readonly 'import/prefer-default-export': "error";
51
52
  readonly 'import/unambiguous': "error";
52
- readonly 'no-duplicate-imports': "off";
53
53
  };
54
54
  export default rules;
@@ -2,6 +2,7 @@ const rules = {
2
2
  'import/consistent-type-specifier-style': 'error',
3
3
  'import/default': 'error',
4
4
  'import/dynamic-import-chunkname': 'off',
5
+ 'import/enforce-node-protocol-usage': ['error', 'always'],
5
6
  'import/export': 'error',
6
7
  'import/exports-last': 'error',
7
8
  'import/extensions': [
@@ -28,7 +29,7 @@ const rules = {
28
29
  'import/no-cycle': 'error',
29
30
  'import/no-default-export': 'off',
30
31
  'import/no-deprecated': 'error',
31
- 'import/no-duplicates': 'error',
32
+ 'import/no-duplicates': 'off',
32
33
  'import/no-dynamic-require': 'error',
33
34
  'import/no-empty-named-blocks': 'error',
34
35
  'import/no-extraneous-dependencies': 'off',
@@ -52,7 +53,6 @@ const rules = {
52
53
  'import/no-webpack-loader-syntax': 'error',
53
54
  'import/order': 'off',
54
55
  'import/prefer-default-export': 'error',
55
- 'import/unambiguous': 'error',
56
- 'no-duplicate-imports': 'off'
56
+ 'import/unambiguous': 'error'
57
57
  };
58
58
  export default rules;
@@ -24,7 +24,6 @@ declare const rules: {
24
24
  readonly '@stylistic/curly-newline': ["error", "always"];
25
25
  readonly '@stylistic/dot-location': ["error", "property"];
26
26
  readonly '@stylistic/eol-last': "error";
27
- readonly '@stylistic/func-call-spacing': ["error", "never"];
28
27
  readonly '@stylistic/function-call-argument-newline': ["error", "consistent"];
29
28
  readonly '@stylistic/function-call-spacing': ["error", "never"];
30
29
  readonly '@stylistic/function-paren-newline': ["error", "multiline"];
@@ -47,7 +46,6 @@ declare const rules: {
47
46
  readonly '@stylistic/jsx-equals-spacing': "error";
48
47
  readonly '@stylistic/jsx-first-prop-new-line': "error";
49
48
  readonly '@stylistic/jsx-function-call-newline': "error";
50
- readonly '@stylistic/jsx-indent': "off";
51
49
  readonly '@stylistic/jsx-indent-props': ["error", 2];
52
50
  readonly '@stylistic/jsx-max-props-per-line': "error";
53
51
  readonly '@stylistic/jsx-newline': "off";
@@ -109,7 +107,9 @@ declare const rules: {
109
107
  readonly '@stylistic/padded-blocks': ["error", "never"];
110
108
  readonly '@stylistic/padding-line-between-statements': "error";
111
109
  readonly '@stylistic/quote-props': ["error", "as-needed"];
112
- readonly '@stylistic/quotes': ["error", "single", "avoid-escape"];
110
+ readonly '@stylistic/quotes': ["error", "single", {
111
+ readonly avoidEscape: true;
112
+ }];
113
113
  readonly '@stylistic/rest-spread-spacing': ["error", "never"];
114
114
  readonly '@stylistic/semi': ["error", "always"];
115
115
  readonly '@stylistic/semi-spacing': ["error", {
@@ -36,8 +36,6 @@ const rules = {
36
36
  '@stylistic/curly-newline': ['error', 'always'],
37
37
  '@stylistic/dot-location': ['error', 'property'],
38
38
  '@stylistic/eol-last': 'error',
39
- // Alias of `@stylistic/function-call-spacing`
40
- '@stylistic/func-call-spacing': ['error', 'never'],
41
39
  '@stylistic/function-call-argument-newline': ['error', 'consistent'],
42
40
  '@stylistic/function-call-spacing': ['error', 'never'],
43
41
  '@stylistic/function-paren-newline': ['error', 'multiline'],
@@ -69,7 +67,6 @@ const rules = {
69
67
  '@stylistic/jsx-equals-spacing': 'error',
70
68
  '@stylistic/jsx-first-prop-new-line': 'error',
71
69
  '@stylistic/jsx-function-call-newline': 'error',
72
- '@stylistic/jsx-indent': 'off',
73
70
  '@stylistic/jsx-indent-props': ['error', 2],
74
71
  '@stylistic/jsx-max-props-per-line': 'error',
75
72
  '@stylistic/jsx-newline': 'off',
@@ -143,7 +140,7 @@ const rules = {
143
140
  '@stylistic/quotes': [
144
141
  'error',
145
142
  'single',
146
- 'avoid-escape'
143
+ { avoidEscape: true }
147
144
  ],
148
145
  '@stylistic/rest-spread-spacing': ['error', 'never'],
149
146
  '@stylistic/semi': ['error', 'always'],
package/dist/vitest.d.ts CHANGED
@@ -1,225 +1,8 @@
1
+ import type { ESLint } from 'eslint';
1
2
  declare const config: {
2
3
  readonly files: ["**/*.{spec,test}.{js,jsx,mjs,cjs}", "**/*.{spec,test}.{ts,tsx,mts,cts}"];
3
4
  readonly plugins: {
4
- readonly vitest: {
5
- meta: {
6
- name: string;
7
- version: string;
8
- };
9
- rules: {
10
- "prefer-lowercase-title": import("eslint").Rule.RuleModule;
11
- "max-nested-describe": import("eslint").Rule.RuleModule;
12
- "no-identical-title": import("eslint").Rule.RuleModule;
13
- "no-focused-tests": import("eslint").Rule.RuleModule;
14
- "no-conditional-tests": import("eslint").Rule.RuleModule;
15
- "expect-expect": import("eslint").Rule.RuleModule;
16
- "consistent-test-it": import("eslint").Rule.RuleModule;
17
- "prefer-to-be": import("eslint").Rule.RuleModule;
18
- "no-hooks": import("eslint").Rule.RuleModule;
19
- "no-restricted-vi-methods": import("eslint").Rule.RuleModule;
20
- "consistent-test-filename": import("eslint").Rule.RuleModule;
21
- "max-expects": import("eslint").Rule.RuleModule;
22
- "no-alias-methods": import("eslint").Rule.RuleModule;
23
- "no-commented-out-tests": import("eslint").Rule.RuleModule;
24
- "no-conditional-expect": import("eslint").Rule.RuleModule;
25
- "no-conditional-in-test": import("eslint").Rule.RuleModule;
26
- "no-disabled-tests": import("eslint").Rule.RuleModule;
27
- "no-done-callback": import("eslint").Rule.RuleModule;
28
- "no-duplicate-hooks": import("eslint").Rule.RuleModule;
29
- "no-large-snapshots": import("eslint").Rule.RuleModule;
30
- "no-interpolation-in-snapshots": import("eslint").Rule.RuleModule;
31
- "no-mocks-import": import("eslint").Rule.RuleModule;
32
- "no-restricted-matchers": import("eslint").Rule.RuleModule;
33
- "no-standalone-expect": import("eslint").Rule.RuleModule;
34
- "no-test-prefixes": import("eslint").Rule.RuleModule;
35
- "no-test-return-statement": import("eslint").Rule.RuleModule;
36
- "no-import-node-test": import("eslint").Rule.RuleModule;
37
- "prefer-called-with": import("eslint").Rule.RuleModule;
38
- "valid-title": import("eslint").Rule.RuleModule;
39
- "valid-expect": import("eslint").Rule.RuleModule;
40
- "prefer-to-be-falsy": import("eslint").Rule.RuleModule;
41
- "prefer-to-be-object": import("eslint").Rule.RuleModule;
42
- "prefer-to-be-truthy": import("eslint").Rule.RuleModule;
43
- "prefer-to-have-length": import("eslint").Rule.RuleModule;
44
- "prefer-equality-matcher": import("eslint").Rule.RuleModule;
45
- "prefer-strict-equal": import("eslint").Rule.RuleModule;
46
- "prefer-expect-resolves": import("eslint").Rule.RuleModule;
47
- "prefer-each": import("eslint").Rule.RuleModule;
48
- "prefer-hooks-on-top": import("eslint").Rule.RuleModule;
49
- "prefer-hooks-in-order": import("eslint").Rule.RuleModule;
50
- "require-local-test-context-for-concurrent-snapshots": import("eslint").Rule.RuleModule;
51
- "prefer-mock-promise-shorthand": import("eslint").Rule.RuleModule;
52
- "prefer-vi-mocked": import("eslint").Rule.RuleModule;
53
- "prefer-snapshot-hint": import("eslint").Rule.RuleModule;
54
- "valid-describe-callback": import("eslint").Rule.RuleModule;
55
- "require-top-level-describe": import("eslint").Rule.RuleModule;
56
- "require-to-throw-message": import("eslint").Rule.RuleModule;
57
- "require-hook": import("eslint").Rule.RuleModule;
58
- "prefer-todo": import("eslint").Rule.RuleModule;
59
- "prefer-spy-on": import("eslint").Rule.RuleModule;
60
- "prefer-comparison-matcher": import("eslint").Rule.RuleModule;
61
- "prefer-describe-function-title": import("eslint").Rule.RuleModule;
62
- "prefer-to-contain": import("eslint").Rule.RuleModule;
63
- "prefer-expect-assertions": import("eslint").Rule.RuleModule;
64
- "padding-around-after-all-blocks": import("eslint").Rule.RuleModule;
65
- "padding-around-after-each-blocks": import("eslint").Rule.RuleModule;
66
- "padding-around-all": import("eslint").Rule.RuleModule;
67
- "padding-around-before-all-blocks": import("eslint").Rule.RuleModule;
68
- "padding-around-before-each-blocks": import("eslint").Rule.RuleModule;
69
- "padding-around-describe-blocks": import("eslint").Rule.RuleModule;
70
- "padding-around-expect-groups": import("eslint").Rule.RuleModule;
71
- "padding-around-test-blocks": import("eslint").Rule.RuleModule;
72
- "valid-expect-in-promise": import("eslint").Rule.RuleModule;
73
- "prefer-strict-boolean-matchers": import("eslint").Rule.RuleModule;
74
- "require-mock-type-parameters": import("eslint").Rule.RuleModule;
75
- };
76
- environments: {
77
- env: {
78
- globals: {
79
- suite: true;
80
- test: true;
81
- describe: true;
82
- it: true;
83
- expectTypeOf: true;
84
- assertType: true;
85
- expect: true;
86
- assert: true;
87
- chai: true;
88
- vitest: true;
89
- vi: true;
90
- beforeAll: true;
91
- afterAll: true;
92
- beforeEach: true;
93
- afterEach: true;
94
- onTestFailed: true;
95
- onTestFinished: true;
96
- };
97
- };
98
- };
99
- configs: {
100
- "legacy-recommended": {
101
- plugins: string[];
102
- rules: {};
103
- };
104
- "legacy-all": {
105
- plugins: string[];
106
- rules: {};
107
- };
108
- recommended: {
109
- name: string;
110
- plugins: {
111
- readonly vitest: import("eslint").ESLint.Plugin;
112
- };
113
- rules: {
114
- readonly "vitest/expect-expect": "error";
115
- readonly "vitest/no-identical-title": "error";
116
- readonly "vitest/no-commented-out-tests": "error";
117
- readonly "vitest/valid-title": "error";
118
- readonly "vitest/valid-expect": "error";
119
- readonly "vitest/valid-describe-callback": "error";
120
- readonly "vitest/require-local-test-context-for-concurrent-snapshots": "error";
121
- readonly "vitest/no-import-node-test": "error";
122
- };
123
- };
124
- all: {
125
- name: string;
126
- plugins: {
127
- readonly vitest: import("eslint").ESLint.Plugin;
128
- };
129
- rules: {
130
- readonly "vitest/prefer-lowercase-title": "warn";
131
- readonly "vitest/max-nested-describe": "warn";
132
- readonly "vitest/no-focused-tests": "warn";
133
- readonly "vitest/no-conditional-tests": "warn";
134
- readonly "vitest/consistent-test-it": "warn";
135
- readonly "vitest/no-hooks": "warn";
136
- readonly "vitest/no-restricted-vi-methods": "warn";
137
- readonly "vitest/consistent-test-filename": "warn";
138
- readonly "vitest/max-expects": "warn";
139
- readonly "vitest/no-alias-methods": "warn";
140
- readonly "vitest/no-conditional-expect": "warn";
141
- readonly "vitest/no-conditional-in-test": "warn";
142
- readonly "vitest/no-disabled-tests": "warn";
143
- readonly "vitest/no-done-callback": "warn";
144
- readonly "vitest/no-duplicate-hooks": "warn";
145
- readonly "vitest/no-large-snapshots": "warn";
146
- readonly "vitest/no-interpolation-in-snapshots": "warn";
147
- readonly "vitest/no-mocks-import": "warn";
148
- readonly "vitest/no-restricted-matchers": "warn";
149
- readonly "vitest/no-standalone-expect": "warn";
150
- readonly "vitest/no-test-prefixes": "warn";
151
- readonly "vitest/no-test-return-statement": "warn";
152
- readonly "vitest/prefer-called-with": "warn";
153
- readonly "vitest/prefer-to-be-falsy": "off";
154
- readonly "vitest/prefer-to-be-object": "warn";
155
- readonly "vitest/prefer-to-be-truthy": "off";
156
- readonly "vitest/prefer-to-have-length": "warn";
157
- readonly "vitest/prefer-equality-matcher": "warn";
158
- readonly "vitest/prefer-strict-equal": "warn";
159
- readonly "vitest/prefer-expect-resolves": "warn";
160
- readonly "vitest/prefer-each": "warn";
161
- readonly "vitest/prefer-hooks-on-top": "warn";
162
- readonly "vitest/prefer-hooks-in-order": "warn";
163
- readonly "vitest/prefer-mock-promise-shorthand": "warn";
164
- readonly "vitest/prefer-vi-mocked": "warn";
165
- readonly "vitest/prefer-snapshot-hint": "warn";
166
- readonly "vitest/require-top-level-describe": "warn";
167
- readonly "vitest/require-to-throw-message": "warn";
168
- readonly "vitest/require-hook": "warn";
169
- readonly "vitest/prefer-todo": "warn";
170
- readonly "vitest/prefer-spy-on": "warn";
171
- readonly "vitest/prefer-comparison-matcher": "warn";
172
- readonly "vitest/prefer-describe-function-title": "warn";
173
- readonly "vitest/prefer-to-contain": "warn";
174
- readonly "vitest/prefer-expect-assertions": "warn";
175
- readonly "vitest/prefer-to-be": "warn";
176
- readonly "vitest/padding-around-after-all-blocks": "warn";
177
- readonly "vitest/padding-around-after-each-blocks": "warn";
178
- readonly "vitest/padding-around-all": "warn";
179
- readonly "vitest/padding-around-before-all-blocks": "warn";
180
- readonly "vitest/padding-around-before-each-blocks": "warn";
181
- readonly "vitest/padding-around-describe-blocks": "warn";
182
- readonly "vitest/padding-around-expect-groups": "warn";
183
- readonly "vitest/padding-around-test-blocks": "warn";
184
- readonly "vitest/valid-expect-in-promise": "warn";
185
- readonly "vitest/expect-expect": "warn";
186
- readonly "vitest/no-identical-title": "warn";
187
- readonly "vitest/no-commented-out-tests": "warn";
188
- readonly "vitest/valid-title": "warn";
189
- readonly "vitest/valid-expect": "warn";
190
- readonly "vitest/valid-describe-callback": "warn";
191
- readonly "vitest/require-local-test-context-for-concurrent-snapshots": "warn";
192
- readonly "vitest/no-import-node-test": "warn";
193
- readonly "vitest/prefer-strict-boolean-matchers": "warn";
194
- readonly "vitest/require-mock-type-parameters": "warn";
195
- };
196
- };
197
- env: {
198
- name: string;
199
- languageOptions: {
200
- globals: {
201
- suite: "writable";
202
- test: "writable";
203
- describe: "writable";
204
- it: "writable";
205
- expectTypeOf: "writable";
206
- assertType: "writable";
207
- expect: "writable";
208
- assert: "writable";
209
- chai: "writable";
210
- vitest: "writable";
211
- vi: "writable";
212
- beforeAll: "writable";
213
- afterAll: "writable";
214
- beforeEach: "writable";
215
- afterEach: "writable";
216
- onTestFailed: "writable";
217
- onTestFinished: "writable";
218
- };
219
- };
220
- };
221
- };
222
- };
5
+ readonly vitest: ESLint.Plugin;
223
6
  };
224
7
  readonly rules: {
225
8
  readonly 'max-lines-per-function': "off";
@@ -229,6 +12,7 @@ declare const config: {
229
12
  }];
230
13
  readonly 'vitest/consistent-test-filename': "error";
231
14
  readonly 'vitest/consistent-test-it': "error";
15
+ readonly 'vitest/consistent-vitest-vi': "error";
232
16
  readonly 'vitest/expect-expect': "error";
233
17
  readonly 'vitest/max-expects': "error";
234
18
  readonly 'vitest/max-nested-describe': "error";
@@ -243,6 +27,7 @@ declare const config: {
243
27
  readonly 'vitest/no-hooks': "off";
244
28
  readonly 'vitest/no-identical-title': "error";
245
29
  readonly 'vitest/no-import-node-test': "error";
30
+ readonly 'vitest/no-importing-vitest-globals': "off";
246
31
  readonly 'vitest/no-interpolation-in-snapshots': "error";
247
32
  readonly 'vitest/no-large-snapshots': "error";
248
33
  readonly 'vitest/no-mocks-import': "error";
@@ -259,6 +44,8 @@ declare const config: {
259
44
  readonly 'vitest/padding-around-describe-blocks': "error";
260
45
  readonly 'vitest/padding-around-expect-groups': "error";
261
46
  readonly 'vitest/padding-around-test-blocks': "error";
47
+ readonly 'vitest/prefer-called-once': "error";
48
+ readonly 'vitest/prefer-called-times': "off";
262
49
  readonly 'vitest/prefer-called-with': "error";
263
50
  readonly 'vitest/prefer-comparison-matcher': "error";
264
51
  readonly 'vitest/prefer-describe-function-title': "error";
@@ -270,6 +57,7 @@ declare const config: {
270
57
  readonly 'vitest/prefer-expect-resolves': "error";
271
58
  readonly 'vitest/prefer-hooks-in-order': "error";
272
59
  readonly 'vitest/prefer-hooks-on-top': "error";
60
+ readonly 'vitest/prefer-importing-vitest-globals': "error";
273
61
  readonly 'vitest/prefer-lowercase-title': "error";
274
62
  readonly 'vitest/prefer-mock-promise-shorthand': "error";
275
63
  readonly 'vitest/prefer-snapshot-hint': "error";
@@ -293,6 +81,7 @@ declare const config: {
293
81
  readonly 'vitest/valid-expect': "error";
294
82
  readonly 'vitest/valid-expect-in-promise': "error";
295
83
  readonly 'vitest/valid-title': "error";
84
+ readonly 'vitest/warn-todo': "error";
296
85
  };
297
86
  };
298
87
  export { config as vitest };
package/dist/vitest.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import vitest from '@vitest/eslint-plugin';
2
2
  const config = {
3
3
  files: ['**/*.{spec,test}.{js,jsx,mjs,cjs}', '**/*.{spec,test}.{ts,tsx,mts,cts}'],
4
- plugins: { vitest },
4
+ plugins: { vitest: vitest },
5
5
  rules: {
6
6
  'max-lines-per-function': 'off',
7
7
  'max-statements': 'off',
@@ -13,6 +13,7 @@ const config = {
13
13
  ],
14
14
  'vitest/consistent-test-filename': 'error',
15
15
  'vitest/consistent-test-it': 'error',
16
+ 'vitest/consistent-vitest-vi': 'error',
16
17
  'vitest/expect-expect': 'error',
17
18
  'vitest/max-expects': 'error',
18
19
  'vitest/max-nested-describe': 'error',
@@ -27,6 +28,7 @@ const config = {
27
28
  'vitest/no-hooks': 'off',
28
29
  'vitest/no-identical-title': 'error',
29
30
  'vitest/no-import-node-test': 'error',
31
+ 'vitest/no-importing-vitest-globals': 'off',
30
32
  'vitest/no-interpolation-in-snapshots': 'error',
31
33
  'vitest/no-large-snapshots': 'error',
32
34
  'vitest/no-mocks-import': 'error',
@@ -43,6 +45,8 @@ const config = {
43
45
  'vitest/padding-around-describe-blocks': 'error',
44
46
  'vitest/padding-around-expect-groups': 'error',
45
47
  'vitest/padding-around-test-blocks': 'error',
48
+ 'vitest/prefer-called-once': 'error',
49
+ 'vitest/prefer-called-times': 'off',
46
50
  'vitest/prefer-called-with': 'error',
47
51
  'vitest/prefer-comparison-matcher': 'error',
48
52
  'vitest/prefer-describe-function-title': 'error',
@@ -52,6 +56,7 @@ const config = {
52
56
  'vitest/prefer-expect-resolves': 'error',
53
57
  'vitest/prefer-hooks-in-order': 'error',
54
58
  'vitest/prefer-hooks-on-top': 'error',
59
+ 'vitest/prefer-importing-vitest-globals': 'error',
55
60
  'vitest/prefer-lowercase-title': 'error',
56
61
  'vitest/prefer-mock-promise-shorthand': 'error',
57
62
  'vitest/prefer-snapshot-hint': 'error',
@@ -74,7 +79,8 @@ const config = {
74
79
  'vitest/valid-describe-callback': 'error',
75
80
  'vitest/valid-expect': 'error',
76
81
  'vitest/valid-expect-in-promise': 'error',
77
- 'vitest/valid-title': 'error'
82
+ 'vitest/valid-title': 'error',
83
+ 'vitest/warn-todo': 'error'
78
84
  }
79
85
  };
80
86
  export { config as vitest };
package/package.json CHANGED
@@ -1,32 +1,31 @@
1
1
  {
2
2
  "name": "@egy186/eslint-config",
3
3
  "description": "Eslint shareable config",
4
- "version": "3.1.0",
4
+ "version": "3.2.1",
5
5
  "author": "egy186",
6
6
  "bugs": {
7
7
  "url": "https://github.com/egy186/eslint-config/issues"
8
8
  },
9
9
  "dependencies": {
10
- "@stylistic/eslint-plugin": "~4.4.1",
11
- "eslint-plugin-import": "~2.31.0",
12
- "eslint-plugin-jsdoc": "~50.7.1",
13
- "eslint-plugin-n": "~17.19.0",
14
- "globals": "^16.2.0"
10
+ "@stylistic/eslint-plugin": "~5.2.0",
11
+ "eslint-plugin-import": "~2.32.0",
12
+ "eslint-plugin-jsdoc": "~51.4.1",
13
+ "eslint-plugin-n": "~17.21.0",
14
+ "globals": "^16.3.0"
15
15
  },
16
16
  "devDependencies": {
17
- "@eslint-stylistic/metadata": "~4.4.1",
18
- "@eslint/js": "~9.28.0",
19
- "@types/node": "^22.15.30",
20
- "@vitest/eslint-plugin": "~1.2.1",
21
- "eslint": "~9.28.0",
22
- "eslint-import-resolver-typescript": "~4.4.3",
23
- "eslint-plugin-jest": "~28.13.0",
17
+ "@eslint/js": "~9.31.0",
18
+ "@types/node": "^24.0.15",
19
+ "@vitest/eslint-plugin": "~1.3.4",
20
+ "eslint": "~9.31.0",
21
+ "eslint-import-resolver-typescript": "~4.4.4",
22
+ "eslint-plugin-jest": "~29.0.1",
24
23
  "eslint-plugin-react": "~7.37.5",
25
24
  "eslint-plugin-react-hooks": "~5.2.0",
26
25
  "husky": "^9.1.7",
27
26
  "jiti": "^2.4.2",
28
27
  "typescript": "~5.8.3",
29
- "typescript-eslint": "~8.33.1"
28
+ "typescript-eslint": "~8.37.0"
30
29
  },
31
30
  "engines": {
32
31
  "node": ">=20.19.2"
@@ -54,7 +53,10 @@
54
53
  }
55
54
  },
56
55
  "files": [
57
- "dist"
56
+ "dist",
57
+ "!dist/test-utils",
58
+ "!dist/**/*.test.js",
59
+ "!dist/**/*.test.d.ts"
58
60
  ],
59
61
  "homepage": "https://github.com/egy186/eslint-config#readme",
60
62
  "keywords": [
@@ -64,10 +66,10 @@
64
66
  "license": "MIT",
65
67
  "main": "./dist/index.js",
66
68
  "peerDependencies": {
67
- "@vitest/eslint-plugin": "^1.1.42",
68
- "eslint": "^9.27.0",
69
+ "@vitest/eslint-plugin": "^1.3.3",
70
+ "eslint": "^9.30.1",
69
71
  "eslint-import-resolver-typescript": "^4.2.2",
70
- "eslint-plugin-jest": "^28.13.0",
72
+ "eslint-plugin-jest": "^29.0.1",
71
73
  "eslint-plugin-react": "^7.36.1",
72
74
  "eslint-plugin-react-hooks": "^5.0.0",
73
75
  "typescript": "^5.0.4",
@@ -108,8 +110,8 @@
108
110
  "clean": "npm run build -- --clean",
109
111
  "lint": "eslint",
110
112
  "prepare": "husky",
111
- "test": "jiti test/test.ts",
112
- "typecheck": "tsc --project tsconfig.typecheck.json"
113
+ "pretest": "npm run build",
114
+ "test": "node --test **/*.test.js"
113
115
  },
114
116
  "type": "module",
115
117
  "types": "./dist/index.d.ts"