@jimmy.codes/eslint-config 7.3.0 → 7.5.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.
@@ -1,7 +1,6 @@
1
1
  import { GLOB_ASTRO } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
3
3
  import globals from "globals";
4
-
5
4
  //#region src/configs/astro.ts
6
5
  async function astroConfig(options) {
7
6
  const extractedOptions = extractOptions(options);
@@ -65,7 +64,6 @@ async function astroConfig(options) {
65
64
  }
66
65
  ];
67
66
  }
68
-
69
67
  //#endregion
70
68
  //#region src/utils/upwarn.ts
71
69
  /**
@@ -80,6 +78,5 @@ const upwarn = (rules = {}) => {
80
78
  return [rule, option === "warn" ? "error" : option];
81
79
  }));
82
80
  };
83
-
84
81
  //#endregion
85
- export { astroConfig as default, upwarn as t };
82
+ export { astroConfig as default, upwarn as t };
package/dist/globs.mjs CHANGED
@@ -75,6 +75,5 @@ const GLOB_IGNORES = [
75
75
  "**/*.gen.*",
76
76
  "!.storybook"
77
77
  ];
78
-
79
78
  //#endregion
80
- export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_TYPE_TESTS };
79
+ export { GLOB_ASTRO, GLOB_CJS, GLOB_E2E, GLOB_IGNORES, GLOB_JS, GLOB_JSX, GLOB_NEXTJS, GLOB_PLAYWRIGHT, GLOB_TESTS, GLOB_TS, GLOB_TSX, GLOB_TYPE_TESTS };
@@ -1,5 +1,4 @@
1
1
  import { isPackageExists } from "local-pkg";
2
-
3
2
  //#region src/utils/has-dependency.ts
4
3
  const hasTypescript = () => {
5
4
  return isPackageExists("typescript");
@@ -34,6 +33,5 @@ const hasNext = () => {
34
33
  const hasVite = () => {
35
34
  return isPackageExists("vite");
36
35
  };
37
-
38
36
  //#endregion
39
- export { hasReact as a, hasTestingLibrary as c, hasVitest as d, hasPlaywright as i, hasTypescript as l, hasJest as n, hasReactQuery as o, hasNext as r, hasStorybook as s, hasAstro as t, hasVite as u };
37
+ export { hasReact as a, hasTestingLibrary as c, hasVitest as d, hasPlaywright as i, hasTypescript as l, hasJest as n, hasReactQuery as o, hasNext as r, hasStorybook as s, hasAstro as t, hasVite as u };
package/dist/index.d.mts CHANGED
@@ -30,6 +30,7 @@ interface RuleOptions {
30
30
  /**
31
31
  * disallow unused `eslint-disable` comments
32
32
  * @see https://eslint-community.github.io/eslint-plugin-eslint-comments/rules/no-unused-disable.html
33
+ * @deprecated
33
34
  */
34
35
  '@eslint-community/eslint-comments/no-unused-disable'?: Linter.RuleEntry<[]>;
35
36
  /**
@@ -4546,6 +4547,11 @@ interface RuleOptions {
4546
4547
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-hooks.md
4547
4548
  */
4548
4549
  'playwright/no-duplicate-hooks'?: Linter.RuleEntry<[]>;
4550
+ /**
4551
+ * Disallow multiple `test.slow()` calls in the same test
4552
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-duplicate-slow.md
4553
+ */
4554
+ 'playwright/no-duplicate-slow'?: Linter.RuleEntry<[]>;
4549
4555
  /**
4550
4556
  * The use of ElementHandle is discouraged, use Locator instead
4551
4557
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-element-handle.md
@@ -4611,6 +4617,11 @@ interface RuleOptions {
4611
4617
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-matchers.md
4612
4618
  */
4613
4619
  'playwright/no-restricted-matchers'?: Linter.RuleEntry<PlaywrightNoRestrictedMatchers>;
4620
+ /**
4621
+ * Disallows the usage of specific roles in getByRole()
4622
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-restricted-roles.md
4623
+ */
4624
+ 'playwright/no-restricted-roles'?: Linter.RuleEntry<PlaywrightNoRestrictedRoles>;
4614
4625
  /**
4615
4626
  * Prevent usage of the `.skip()` skip test annotation.
4616
4627
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/no-skipped-test.md
@@ -4736,6 +4747,16 @@ interface RuleOptions {
4736
4747
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-soft-assertions.md
4737
4748
  */
4738
4749
  'playwright/require-soft-assertions'?: Linter.RuleEntry<[]>;
4750
+ /**
4751
+ * Require test blocks to have tags
4752
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-tags.md
4753
+ */
4754
+ 'playwright/require-tags'?: Linter.RuleEntry<[]>;
4755
+ /**
4756
+ * Require a timeout option for `toPass()`
4757
+ * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-pass-timeout.md
4758
+ */
4759
+ 'playwright/require-to-pass-timeout'?: Linter.RuleEntry<[]>;
4739
4760
  /**
4740
4761
  * Require a message for `toThrow()`
4741
4762
  * @see https://github.com/mskelton/eslint-plugin-playwright/tree/main/docs/rules/require-to-throw-message.md
@@ -7587,33 +7608,33 @@ type StylisticExpListStyle = [] | [{
7587
7608
  singleLine?: _StylisticExpListStyle_SingleLineConfig;
7588
7609
  multiLine?: _StylisticExpListStyle_MultiLineConfig;
7589
7610
  overrides?: {
7590
- "()"?: _StylisticExpListStyle_BaseConfig;
7591
- "[]"?: _StylisticExpListStyle_BaseConfig;
7592
- "{}"?: _StylisticExpListStyle_BaseConfig;
7593
- "<>"?: _StylisticExpListStyle_BaseConfig;
7594
- ArrayExpression?: _StylisticExpListStyle_BaseConfig;
7595
- ArrayPattern?: _StylisticExpListStyle_BaseConfig;
7596
- ArrowFunctionExpression?: _StylisticExpListStyle_BaseConfig;
7597
- CallExpression?: _StylisticExpListStyle_BaseConfig;
7598
- ExportNamedDeclaration?: _StylisticExpListStyle_BaseConfig;
7599
- FunctionDeclaration?: _StylisticExpListStyle_BaseConfig;
7600
- FunctionExpression?: _StylisticExpListStyle_BaseConfig;
7601
- IfStatement?: _StylisticExpListStyle_BaseConfig;
7602
- ImportAttributes?: _StylisticExpListStyle_BaseConfig;
7603
- ImportDeclaration?: _StylisticExpListStyle_BaseConfig;
7604
- JSONArrayExpression?: _StylisticExpListStyle_BaseConfig;
7605
- JSONObjectExpression?: _StylisticExpListStyle_BaseConfig;
7606
- NewExpression?: _StylisticExpListStyle_BaseConfig;
7607
- ObjectExpression?: _StylisticExpListStyle_BaseConfig;
7608
- ObjectPattern?: _StylisticExpListStyle_BaseConfig;
7609
- TSDeclareFunction?: _StylisticExpListStyle_BaseConfig;
7610
- TSEnumBody?: _StylisticExpListStyle_BaseConfig;
7611
- TSFunctionType?: _StylisticExpListStyle_BaseConfig;
7612
- TSInterfaceBody?: _StylisticExpListStyle_BaseConfig;
7613
- TSTupleType?: _StylisticExpListStyle_BaseConfig;
7614
- TSTypeLiteral?: _StylisticExpListStyle_BaseConfig;
7615
- TSTypeParameterDeclaration?: _StylisticExpListStyle_BaseConfig;
7616
- TSTypeParameterInstantiation?: _StylisticExpListStyle_BaseConfig;
7611
+ "()"?: (_StylisticExpListStyle_BaseConfig | "off");
7612
+ "[]"?: (_StylisticExpListStyle_BaseConfig | "off");
7613
+ "{}"?: (_StylisticExpListStyle_BaseConfig | "off");
7614
+ "<>"?: (_StylisticExpListStyle_BaseConfig | "off");
7615
+ ArrayExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7616
+ ArrayPattern?: (_StylisticExpListStyle_BaseConfig | "off");
7617
+ ArrowFunctionExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7618
+ CallExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7619
+ ExportNamedDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7620
+ FunctionDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7621
+ FunctionExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7622
+ IfStatement?: (_StylisticExpListStyle_BaseConfig | "off");
7623
+ ImportAttributes?: (_StylisticExpListStyle_BaseConfig | "off");
7624
+ ImportDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7625
+ JSONArrayExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7626
+ JSONObjectExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7627
+ NewExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7628
+ ObjectExpression?: (_StylisticExpListStyle_BaseConfig | "off");
7629
+ ObjectPattern?: (_StylisticExpListStyle_BaseConfig | "off");
7630
+ TSDeclareFunction?: (_StylisticExpListStyle_BaseConfig | "off");
7631
+ TSEnumBody?: (_StylisticExpListStyle_BaseConfig | "off");
7632
+ TSFunctionType?: (_StylisticExpListStyle_BaseConfig | "off");
7633
+ TSInterfaceBody?: (_StylisticExpListStyle_BaseConfig | "off");
7634
+ TSTupleType?: (_StylisticExpListStyle_BaseConfig | "off");
7635
+ TSTypeLiteral?: (_StylisticExpListStyle_BaseConfig | "off");
7636
+ TSTypeParameterDeclaration?: (_StylisticExpListStyle_BaseConfig | "off");
7637
+ TSTypeParameterInstantiation?: (_StylisticExpListStyle_BaseConfig | "off");
7617
7638
  };
7618
7639
  }];
7619
7640
  interface _StylisticExpListStyle_SingleLineConfig {
@@ -8474,13 +8495,18 @@ type StylisticPaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
8474
8495
  allowSingleLineBlocks?: boolean;
8475
8496
  }]; // ----- @stylistic/padding-line-between-statements -----
8476
8497
  type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
8477
- type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementType | [_StylisticPaddingLineBetweenStatementsStatementType, ...(_StylisticPaddingLineBetweenStatementsStatementType)[]]);
8498
+ type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementMatcher | [_StylisticPaddingLineBetweenStatementsStatementMatcher, ...(_StylisticPaddingLineBetweenStatementsStatementMatcher)[]]);
8499
+ type _StylisticPaddingLineBetweenStatementsStatementMatcher = (_StylisticPaddingLineBetweenStatementsStatementType | _StylisticPaddingLineBetweenStatements_SelectorOption);
8478
8500
  type _StylisticPaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "return" | "singleline-return" | "multiline-return" | "export" | "singleline-export" | "multiline-export" | "var" | "singleline-var" | "multiline-var" | "let" | "singleline-let" | "multiline-let" | "const" | "singleline-const" | "multiline-const" | "using" | "singleline-using" | "multiline-using" | "type" | "singleline-type" | "multiline-type");
8479
8501
  type StylisticPaddingLineBetweenStatements = {
8480
8502
  blankLine: _StylisticPaddingLineBetweenStatementsPaddingType;
8481
8503
  prev: _StylisticPaddingLineBetweenStatementsStatementOption;
8482
8504
  next: _StylisticPaddingLineBetweenStatementsStatementOption;
8483
- }[]; // ----- @stylistic/quote-props -----
8505
+ }[];
8506
+ interface _StylisticPaddingLineBetweenStatements_SelectorOption {
8507
+ selector: string;
8508
+ lineMode?: ("any" | "singleline" | "multiline");
8509
+ } // ----- @stylistic/quote-props -----
8484
8510
  type StylisticQuoteProps = ([] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [] | [("always" | "as-needed" | "consistent" | "consistent-as-needed")] | [("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
8485
8511
  keywords?: boolean;
8486
8512
  unnecessary?: boolean;
@@ -10605,6 +10631,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
10605
10631
  endLines?: (number | null);
10606
10632
  maxBlockLines?: (number | null);
10607
10633
  startLines?: (number | null);
10634
+ startLinesWithNoTags?: number;
10608
10635
  tags?: {
10609
10636
  [k: string]: {
10610
10637
  count?: number;
@@ -14385,7 +14412,11 @@ type PlaywrightNoRestrictedLocators = [] | [(string | {
14385
14412
  })[]]; // ----- playwright/no-restricted-matchers -----
14386
14413
  type PlaywrightNoRestrictedMatchers = [] | [{
14387
14414
  [k: string]: (string | null) | undefined;
14388
- }]; // ----- playwright/no-skipped-test -----
14415
+ }]; // ----- playwright/no-restricted-roles -----
14416
+ type PlaywrightNoRestrictedRoles = [] | [(string | {
14417
+ message?: string;
14418
+ role: string;
14419
+ })[]]; // ----- playwright/no-skipped-test -----
14389
14420
  type PlaywrightNoSkippedTest = [] | [{
14390
14421
  allowConditional?: boolean;
14391
14422
  }]; // ----- playwright/no-slowed-test -----
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { GLOB_CJS, GLOB_IGNORES, GLOB_TESTS } from "./globs.mjs";
2
- import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-B4KAkcAy.mjs";
2
+ import { a as hasReact, c as hasTestingLibrary, d as hasVitest, i as hasPlaywright, l as hasTypescript, n as hasJest, o as hasReactQuery, r as hasNext, s as hasStorybook, t as hasAstro } from "./has-dependency-BB12gGNt.mjs";
3
3
  import gitignoreConfig from "eslint-config-flat-gitignore";
4
4
  import globals from "globals";
5
5
  import { recommended } from "@eslint-community/eslint-plugin-eslint-comments/configs";
@@ -15,7 +15,6 @@ import eslintConfigPrettier from "eslint-config-prettier/flat";
15
15
  import * as regexpPlugin from "eslint-plugin-regexp";
16
16
  import stylisticPlugin from "@stylistic/eslint-plugin";
17
17
  import eslintPluginUnicorn from "eslint-plugin-unicorn";
18
-
19
18
  //#region src/configs/commonjs.ts
20
19
  const commonjsConfig = () => {
21
20
  return [{
@@ -24,7 +23,6 @@ const commonjsConfig = () => {
24
23
  name: "jimmy.codes/commonjs"
25
24
  }];
26
25
  };
27
-
28
26
  //#endregion
29
27
  //#region src/rules/eslint-comments.ts
30
28
  const eslintCommentsRules = {
@@ -32,7 +30,6 @@ const eslintCommentsRules = {
32
30
  "@eslint-community/eslint-comments/no-unused-disable": "off",
33
31
  "@eslint-community/eslint-comments/require-description": "error"
34
32
  };
35
-
36
33
  //#endregion
37
34
  //#region src/configs/eslint-comments.ts
38
35
  const eslintCommentsConfig = () => {
@@ -42,7 +39,6 @@ const eslintCommentsConfig = () => {
42
39
  rules: eslintCommentsRules
43
40
  }];
44
41
  };
45
-
46
42
  //#endregion
47
43
  //#region src/configs/ignores.ts
48
44
  const ignoresConfig = (ignores) => {
@@ -51,7 +47,6 @@ const ignoresConfig = (ignores) => {
51
47
  name: "jimmy.codes/ignores"
52
48
  }];
53
49
  };
54
-
55
50
  //#endregion
56
51
  //#region src/rules/imports.ts
57
52
  const importsRules = {
@@ -77,7 +72,6 @@ const importsRules = {
77
72
  "import-x/no-unresolved": ["error", { ignore: [String.raw`\.svg$`] }],
78
73
  "import-x/no-useless-path-segments": "error"
79
74
  };
80
-
81
75
  //#endregion
82
76
  //#region src/configs/imports.ts
83
77
  const importsTypescriptConfig = () => {
@@ -103,7 +97,6 @@ const importsConfig = ({ isTypescriptEnabled = false } = {}) => {
103
97
  rules: importsRules
104
98
  }, ...isTypescriptEnabled ? importsTypescriptConfig() : []];
105
99
  };
106
-
107
100
  //#endregion
108
101
  //#region src/rules/javascript.ts
109
102
  const additionalRules = {
@@ -179,7 +172,6 @@ const javascriptRules = {
179
172
  ...additionalRules,
180
173
  ...configs$1.recommended.rules
181
174
  };
182
-
183
175
  //#endregion
184
176
  //#region src/configs/javascript.ts
185
177
  const javascriptConfig = () => {
@@ -197,7 +189,6 @@ const javascriptConfig = () => {
197
189
  rules: { "no-magic-numbers": "off" }
198
190
  }];
199
191
  };
200
-
201
192
  //#endregion
202
193
  //#region src/rules/jsdoc.ts
203
194
  const jsdocRules = () => {
@@ -221,7 +212,6 @@ const jsdocRules = () => {
221
212
  ]
222
213
  };
223
214
  };
224
-
225
215
  //#endregion
226
216
  //#region src/configs/jsdoc.ts
227
217
  const jsdocConfig = () => {
@@ -231,7 +221,6 @@ const jsdocConfig = () => {
231
221
  rules: jsdocRules()
232
222
  }];
233
223
  };
234
-
235
224
  //#endregion
236
225
  //#region src/rules/node.ts
237
226
  const nodeRules = {
@@ -254,7 +243,6 @@ const nodeRules = {
254
243
  "n/prefer-node-protocol": "error",
255
244
  "n/process-exit-as-throw": "error"
256
245
  };
257
-
258
246
  //#endregion
259
247
  //#region src/configs/node.ts
260
248
  const nodeConfig = () => {
@@ -264,7 +252,6 @@ const nodeConfig = () => {
264
252
  rules: nodeRules
265
253
  }];
266
254
  };
267
-
268
255
  //#endregion
269
256
  //#region src/rules/perfectionist.ts
270
257
  const perfectionistRules = {
@@ -319,7 +306,6 @@ const perfectionistRules = {
319
306
  type: "natural"
320
307
  }]
321
308
  };
322
-
323
309
  //#endregion
324
310
  //#region src/configs/perfectionist.ts
325
311
  const perfectionistConfig = () => {
@@ -329,7 +315,6 @@ const perfectionistConfig = () => {
329
315
  rules: perfectionistRules
330
316
  }];
331
317
  };
332
-
333
318
  //#endregion
334
319
  //#region src/configs/prettier.ts
335
320
  const prettierConfig = () => {
@@ -338,7 +323,6 @@ const prettierConfig = () => {
338
323
  name: "jimmy.codes/prettier"
339
324
  }];
340
325
  };
341
-
342
326
  //#endregion
343
327
  //#region src/rules/regexp.ts
344
328
  const regexpRules = {
@@ -350,7 +334,6 @@ const regexpRules = {
350
334
  "regexp/no-useless-flag": "error",
351
335
  "regexp/optimal-lookaround-quantifier": "error"
352
336
  };
353
-
354
337
  //#endregion
355
338
  //#region src/configs/regexp.ts
356
339
  const regexpConfig = () => {
@@ -360,7 +343,6 @@ const regexpConfig = () => {
360
343
  rules: regexpRules
361
344
  }];
362
345
  };
363
-
364
346
  //#endregion
365
347
  //#region src/rules/stylistic.ts
366
348
  const stylisticRules = {
@@ -461,7 +443,6 @@ const stylisticRules = {
461
443
  }
462
444
  ]
463
445
  };
464
-
465
446
  //#endregion
466
447
  //#region src/configs/stylistic.ts
467
448
  function stylisticConfig() {
@@ -471,7 +452,6 @@ function stylisticConfig() {
471
452
  rules: stylisticRules
472
453
  }];
473
454
  }
474
-
475
455
  //#endregion
476
456
  //#region src/rules/unicorn.ts
477
457
  const unicornRules = {
@@ -488,7 +468,6 @@ const unicornRules = {
488
468
  "unicorn/prefer-node-protocol": "off",
489
469
  "unicorn/prevent-abbreviations": "off"
490
470
  };
491
-
492
471
  //#endregion
493
472
  //#region src/configs/unicorn.ts
494
473
  const unicornConfig = () => {
@@ -498,7 +477,6 @@ const unicornConfig = () => {
498
477
  rules: unicornRules
499
478
  }];
500
479
  };
501
-
502
480
  //#endregion
503
481
  //#region src/utils/create-featured.ts
504
482
  /**
@@ -514,7 +492,6 @@ const createFeatured = (autoDetect) => {
514
492
  return explicit || autoDetect && detector();
515
493
  };
516
494
  };
517
-
518
495
  //#endregion
519
496
  //#region src/utils/unwrap.ts
520
497
  /**
@@ -542,7 +519,6 @@ const unwrap = async (module, ...args) => {
542
519
  if (typeof resolved.default === "function") return resolved.default(...args);
543
520
  return resolved;
544
521
  };
545
-
546
522
  //#endregion
547
523
  //#region src/factory.ts
548
524
  /**
@@ -579,16 +555,16 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
579
555
  stylisticConfig()
580
556
  ];
581
557
  const featureConfigs = await Promise.all([
582
- isTypescriptEnabled && unwrap(import("./typescript-Cae66DX9.mjs"), typescript),
583
- isReactEnabled && unwrap(import("./react-BkGA0owG.mjs"), react),
584
- isTanstackQueryEnabled && unwrap(import("./tanstack-query-CJMINud2.mjs"), tanstackQuery),
585
- isAstroEnabled && unwrap(import("./astro-qFFNUM9D.mjs"), astro),
586
- isJestEnabled && unwrap(import("./jest-BYBtWryE.mjs"), jest),
587
- isVitestEnabled && unwrap(import("./vitest-CHcEa7vN.mjs"), vitest),
588
- isTestingLibraryEnabled && unwrap(import("./testing-library-DAOq7Q2E.mjs"), testingLibrary),
589
- isPlaywrightEnabled && unwrap(import("./playwright-C7C5OcaE.mjs"), playwright),
590
- isStorybookEnabled && unwrap(import("./storybook-vSHixqw5.mjs"), storybook),
591
- isNextjsEnabled && unwrap(import("./nextjs-Q8LOBFAI.mjs"), nextjs)
558
+ isTypescriptEnabled && unwrap(import("./typescript-BGCHPtPk.mjs"), typescript),
559
+ isReactEnabled && unwrap(import("./react-B-iC8XkH.mjs"), react),
560
+ isTanstackQueryEnabled && unwrap(import("./tanstack-query-Iadbe54U.mjs"), tanstackQuery),
561
+ isAstroEnabled && unwrap(import("./astro-BW3KYEZm.mjs"), astro),
562
+ isJestEnabled && unwrap(import("./jest-D8LgvYvq.mjs"), jest),
563
+ isVitestEnabled && unwrap(import("./vitest-KcLI3D-I.mjs"), vitest),
564
+ isTestingLibraryEnabled && unwrap(import("./testing-library-Dm05DzKm.mjs"), testingLibrary),
565
+ isPlaywrightEnabled && unwrap(import("./playwright-B1Eb5eas.mjs"), playwright),
566
+ isStorybookEnabled && unwrap(import("./storybook-DC1i76Qv.mjs"), storybook),
567
+ isNextjsEnabled && unwrap(import("./nextjs-DVffcTz_.mjs"), nextjs)
592
568
  ]);
593
569
  return [
594
570
  ...gitignore ? [gitignoreConfig({ strict: false })] : [],
@@ -601,6 +577,5 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
601
577
  moreOverrides
602
578
  ].flat();
603
579
  };
604
-
605
580
  //#endregion
606
- export { defineConfig };
581
+ export { defineConfig };
@@ -9,7 +9,6 @@
9
9
  const extractOptions = (options) => {
10
10
  if (typeof options !== "boolean") return options;
11
11
  };
12
-
13
12
  //#endregion
14
13
  //#region src/utils/interop-default.ts
15
14
  /**
@@ -25,6 +24,5 @@ const interopDefault = async (module) => {
25
24
  const resolved = await module;
26
25
  return resolved?.default ?? resolved;
27
26
  };
28
-
29
27
  //#endregion
30
- export { extractOptions as n, interopDefault as t };
28
+ export { extractOptions as n, interopDefault as t };
@@ -1,6 +1,5 @@
1
1
  import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
4
3
  //#region src/rules/jest.ts
5
4
  const jestRules = async (options) => {
6
5
  const jestPlugin = await interopDefault(import("eslint-plugin-jest"));
@@ -54,7 +53,6 @@ const jestRules = async (options) => {
54
53
  ...options?.overrides
55
54
  };
56
55
  };
57
-
58
56
  //#endregion
59
57
  //#region src/configs/jest.ts
60
58
  async function jestConfig(options) {
@@ -67,6 +65,5 @@ async function jestConfig(options) {
67
65
  rules: await jestRules(extractedOptions)
68
66
  }];
69
67
  }
70
-
71
68
  //#endregion
72
- export { jestConfig as default };
69
+ export { jestConfig as default };
@@ -1,7 +1,6 @@
1
1
  import { GLOB_NEXTJS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
- import { t as upwarn } from "./astro-qFFNUM9D.mjs";
4
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
3
+ import { t as upwarn } from "./astro-BW3KYEZm.mjs";
5
4
  //#region src/rules/nextjs.ts
6
5
  const nextjsRules = async (options) => {
7
6
  return {
@@ -9,7 +8,6 @@ const nextjsRules = async (options) => {
9
8
  ...options?.overrides
10
9
  };
11
10
  };
12
-
13
11
  //#endregion
14
12
  //#region src/configs/nextjs.ts
15
13
  async function nextjsConfig(options) {
@@ -22,6 +20,5 @@ async function nextjsConfig(options) {
22
20
  rules: await nextjsRules(extractedOptions)
23
21
  }];
24
22
  }
25
-
26
23
  //#endregion
27
- export { nextjsConfig as default };
24
+ export { nextjsConfig as default };
@@ -1,10 +1,10 @@
1
1
  import { GLOB_PLAYWRIGHT } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
3
+ import { t as upwarn } from "./astro-BW3KYEZm.mjs";
4
4
  //#region src/rules/playwright.ts
5
5
  const playwrightRules = async (options) => {
6
6
  return {
7
- ...(await interopDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"].rules,
7
+ ...upwarn((await interopDefault(import("eslint-plugin-playwright"))).configs["flat/recommended"].rules),
8
8
  "playwright/consistent-spacing-between-blocks": "error",
9
9
  "playwright/expect-expect": "error",
10
10
  "playwright/max-nested-describe": "error",
@@ -25,14 +25,12 @@ const playwrightRules = async (options) => {
25
25
  "playwright/prefer-strict-equal": "error",
26
26
  "playwright/prefer-to-be": "error",
27
27
  "playwright/prefer-to-contain": "error",
28
- "playwright/prefer-to-have-count": "error",
29
- "playwright/prefer-to-have-length": "error",
28
+ "playwright/require-to-pass-timeout": "error",
30
29
  "playwright/require-to-throw-message": "error",
31
30
  "playwright/valid-title": "off",
32
31
  ...options?.overrides
33
32
  };
34
33
  };
35
-
36
34
  //#endregion
37
35
  //#region src/configs/playwright.ts
38
36
  async function playwrightConfig(options) {
@@ -44,6 +42,5 @@ async function playwrightConfig(options) {
44
42
  rules: await playwrightRules(extractedOptions)
45
43
  }];
46
44
  }
47
-
48
45
  //#endregion
49
- export { playwrightConfig as default };
46
+ export { playwrightConfig as default };
@@ -1,9 +1,8 @@
1
1
  import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
- import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-B4KAkcAy.mjs";
3
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
4
- import { t as upwarn } from "./astro-qFFNUM9D.mjs";
2
+ import { l as hasTypescript, r as hasNext, u as hasVite } from "./has-dependency-BB12gGNt.mjs";
3
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
4
+ import { t as upwarn } from "./astro-BW3KYEZm.mjs";
5
5
  import globals from "globals";
6
-
7
6
  //#region src/rules/react.ts
8
7
  const nextAllowedExportNames = [
9
8
  "dynamic",
@@ -85,7 +84,6 @@ const reactRules = async (options) => {
85
84
  ...options?.overrides
86
85
  };
87
86
  };
88
-
89
87
  //#endregion
90
88
  //#region src/configs/react.ts
91
89
  async function reactConfig(options) {
@@ -128,6 +126,5 @@ async function reactConfig(options) {
128
126
  settings: { react: { version: "detect" } }
129
127
  }];
130
128
  }
131
-
132
129
  //#endregion
133
- export { reactConfig as default };
130
+ export { reactConfig as default };
@@ -1,6 +1,5 @@
1
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
2
- import { t as upwarn } from "./astro-qFFNUM9D.mjs";
3
-
1
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
2
+ import { t as upwarn } from "./astro-BW3KYEZm.mjs";
4
3
  //#region src/configs/storybook.ts
5
4
  async function storybookConfig(options) {
6
5
  const extractedOptions = extractOptions(options);
@@ -29,6 +28,5 @@ async function storybookConfig(options) {
29
28
  }
30
29
  ];
31
30
  }
32
-
33
31
  //#endregion
34
- export { storybookConfig as default };
32
+ export { storybookConfig as default };
@@ -1,6 +1,5 @@
1
1
  import { GLOB_JSX, GLOB_TSX } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
4
3
  //#region src/configs/tanstack-query.ts
5
4
  async function tanstackQueryConfig(options) {
6
5
  const extractedOptions = extractOptions(options);
@@ -21,6 +20,5 @@ async function tanstackQueryConfig(options) {
21
20
  }
22
21
  }];
23
22
  }
24
-
25
23
  //#endregion
26
- export { tanstackQueryConfig as default };
24
+ export { tanstackQueryConfig as default };
@@ -1,6 +1,5 @@
1
1
  import { GLOB_E2E, GLOB_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
4
3
  //#region src/rules/testing-library.ts
5
4
  const testingLibraryRules = async (options) => {
6
5
  const [jestDom, testingLibrary] = await Promise.all([import("eslint-plugin-jest-dom"), interopDefault(import("eslint-plugin-testing-library"))]);
@@ -11,7 +10,6 @@ const testingLibraryRules = async (options) => {
11
10
  ...options?.overrides
12
11
  };
13
12
  };
14
-
15
13
  //#endregion
16
14
  //#region src/configs/testing-library.ts
17
15
  async function testingLibraryConfig(options) {
@@ -28,6 +26,5 @@ async function testingLibraryConfig(options) {
28
26
  rules: await testingLibraryRules(extractedOptions)
29
27
  }];
30
28
  }
31
-
32
29
  //#endregion
33
- export { testingLibraryConfig as default };
30
+ export { testingLibraryConfig as default };
@@ -1,6 +1,5 @@
1
1
  import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
4
3
  //#region src/rules/typescript.ts
5
4
  const disabledEslintRules = {
6
5
  "no-unused-private-class-members": "off",
@@ -36,7 +35,6 @@ const typescriptRules = (options) => {
36
35
  ...options?.overrides
37
36
  };
38
37
  };
39
-
40
38
  //#endregion
41
39
  //#region src/configs/typescript.ts
42
40
  async function typescriptConfig(options) {
@@ -84,6 +82,5 @@ async function typescriptConfig(options) {
84
82
  }] : []
85
83
  ];
86
84
  }
87
-
88
85
  //#endregion
89
- export { typescriptConfig as default };
86
+ export { typescriptConfig as default };
@@ -1,6 +1,5 @@
1
1
  import { GLOB_E2E, GLOB_TESTS, GLOB_TYPE_TESTS } from "./globs.mjs";
2
- import { n as extractOptions, t as interopDefault } from "./interop-default-DtvCAAmD.mjs";
3
-
2
+ import { n as extractOptions, t as interopDefault } from "./interop-default-BHC7xltH.mjs";
4
3
  //#region src/rules/vitest.ts
5
4
  const vitestRules = async (options) => {
6
5
  return {
@@ -64,7 +63,6 @@ const vitestRules = async (options) => {
64
63
  ...options?.overrides
65
64
  };
66
65
  };
67
-
68
66
  //#endregion
69
67
  //#region src/configs/vitest.ts
70
68
  async function vitestConfig(options) {
@@ -79,6 +77,5 @@ async function vitestConfig(options) {
79
77
  settings: { vitest: { typecheck: extractedOptions?.typecheck ?? false } }
80
78
  }];
81
79
  }
82
-
83
80
  //#endregion
84
- export { vitestConfig as default };
81
+ export { vitestConfig as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "7.3.0",
3
+ "version": "7.5.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -39,47 +39,47 @@
39
39
  "dist"
40
40
  ],
41
41
  "dependencies": {
42
- "@eslint-community/eslint-plugin-eslint-comments": "^4.6.0",
43
- "@eslint/js": "^9.39.2",
42
+ "@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
43
+ "@eslint/js": "^9.39.4",
44
44
  "@next/eslint-plugin-next": "^16.1.6",
45
- "@stylistic/eslint-plugin": "^5.8.0",
45
+ "@stylistic/eslint-plugin": "^5.10.0",
46
46
  "@tanstack/eslint-plugin-query": "^5.91.4",
47
47
  "@types/eslint": "9.6.1",
48
- "@typescript-eslint/parser": "^8.56.0",
49
- "@typescript-eslint/utils": "^8.56.0",
48
+ "@typescript-eslint/parser": "^8.56.1",
49
+ "@typescript-eslint/utils": "^8.56.1",
50
50
  "@vitest/eslint-plugin": "^1.6.9",
51
51
  "astro-eslint-parser": "^1.3.0",
52
- "eslint-config-flat-gitignore": "^2.1.0",
52
+ "eslint-config-flat-gitignore": "^2.2.1",
53
53
  "eslint-config-prettier": "^10.1.8",
54
54
  "eslint-import-resolver-typescript": "^4.4.4",
55
55
  "eslint-plugin-arrow-return-style-x": "^1.2.6",
56
56
  "eslint-plugin-astro": "^1.6.0",
57
- "eslint-plugin-de-morgan": "^2.0.0",
57
+ "eslint-plugin-de-morgan": "^2.1.1",
58
58
  "eslint-plugin-erasable-syntax-only": "0.4.0",
59
59
  "eslint-plugin-import-x": "^4.16.1",
60
60
  "eslint-plugin-jest": "^29.15.0",
61
61
  "eslint-plugin-jest-dom": "^5.5.0",
62
- "eslint-plugin-jsdoc": "^62.5.5",
62
+ "eslint-plugin-jsdoc": "^62.7.1",
63
63
  "eslint-plugin-jsx-a11y": "^6.10.2",
64
64
  "eslint-plugin-n": "^17.24.0",
65
- "eslint-plugin-perfectionist": "^5.5.0",
66
- "eslint-plugin-playwright": "^2.5.1",
65
+ "eslint-plugin-perfectionist": "^5.6.0",
66
+ "eslint-plugin-playwright": "^2.9.0",
67
67
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
68
68
  "eslint-plugin-react-dom": "^2.13.0",
69
69
  "eslint-plugin-react-hooks": "^7.0.1",
70
70
  "eslint-plugin-react-hooks-extra": "^2.13.0",
71
71
  "eslint-plugin-react-naming-convention": "^2.13.0",
72
- "eslint-plugin-react-refresh": "0.5.0",
72
+ "eslint-plugin-react-refresh": "0.5.2",
73
73
  "eslint-plugin-react-rsc": "^2.13.0",
74
74
  "eslint-plugin-react-web-api": "^2.13.0",
75
75
  "eslint-plugin-react-x": "^2.13.0",
76
76
  "eslint-plugin-regexp": "^3.0.0",
77
77
  "eslint-plugin-storybook": "0.12.0",
78
- "eslint-plugin-testing-library": "^7.15.4",
78
+ "eslint-plugin-testing-library": "^7.16.0",
79
79
  "eslint-plugin-unicorn": "^63.0.0",
80
- "globals": "^17.3.0",
80
+ "globals": "^17.4.0",
81
81
  "local-pkg": "^1.1.2",
82
- "typescript-eslint": "^8.56.0"
82
+ "typescript-eslint": "^8.56.1"
83
83
  },
84
84
  "peerDependencies": {
85
85
  "eslint": ">=9.38.0"