@jimmy.codes/eslint-config 6.6.0 → 6.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,14 +10,12 @@
10
10
 
11
11
  A strict but practical ESLint config that works out of the box, adapts to your stack, and enforces good patterns without getting in the way. It catches real bugs, reduces ambiguity, and keeps your codebase consistent.
12
12
 
13
- - **Auto-detects your stack**: React, TypeScript, Astro, Next.js, Vitest, Jest, Playwright, Storybook, and TanStack Query.
13
+ - **Auto-detects your stack**: React, TypeScript, Astro, Next.js, Vitest, Jest, Testing Library, Playwright, Storybook, and TanStack Query.
14
+ - **Zero-config start**: Install it, extend it, done.
14
15
  - **Prevents real issues**: Prioritizes rules that catch bugs and unsafe patterns.
15
16
  - **Prevents confusion**: Flags ambiguous code, confusing promise usage, shadowed variables, and unused exports.
16
17
  - **Enforces consistency**: Standardizes imports, naming, coding style, and testing conventions.
17
- - **Fast and lightweight**: Loads only what your project needs.
18
- - **Zero-config start**: Install it, extend it, done.
19
- - **Customizable**: Turn off or override rules per project or file.
20
- - **Test-ready**: Works with Vitest, Jest, Playwright, and Testing Library.
18
+ - **Flexible**: Easily customize or disable any part of the config.
21
19
 
22
20
  ---
23
21
 
package/dist/index.d.ts CHANGED
@@ -850,8 +850,9 @@ interface RuleOptions {
850
850
  */
851
851
  '@stylistic/jsx-pascal-case'?: Linter.RuleEntry<StylisticJsxPascalCase>;
852
852
  /**
853
- * Disallow multiple spaces between inline JSX props
853
+ * Disallow multiple spaces between inline JSX props. Deprecated, use `no-multi-spaces` rule instead.
854
854
  * @see https://eslint.style/rules/jsx-props-no-multi-spaces
855
+ * @deprecated
855
856
  */
856
857
  '@stylistic/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>;
857
858
  /**
@@ -6629,6 +6630,11 @@ interface RuleOptions {
6629
6630
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/expect-expect.md
6630
6631
  */
6631
6632
  'vitest/expect-expect'?: Linter.RuleEntry<VitestExpectExpect>;
6633
+ /**
6634
+ * enforce hoisted APIs to be on top of the file
6635
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/hoisted-apis-on-top.md
6636
+ */
6637
+ 'vitest/hoisted-apis-on-top'?: Linter.RuleEntry<[]>;
6632
6638
  /**
6633
6639
  * enforce a maximum number of expect per test
6634
6640
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/max-expects.md
@@ -6830,6 +6836,11 @@ interface RuleOptions {
6830
6836
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-resolves.md
6831
6837
  */
6832
6838
  'vitest/prefer-expect-resolves'?: Linter.RuleEntry<[]>;
6839
+ /**
6840
+ * enforce using `expectTypeOf` instead of `expect(typeof ...)`
6841
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-expect-type-of.md
6842
+ */
6843
+ 'vitest/prefer-expect-type-of'?: Linter.RuleEntry<[]>;
6833
6844
  /**
6834
6845
  * enforce having hooks in consistent order
6835
6846
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-in-order.md
@@ -7272,6 +7283,7 @@ type StylisticIndent = [] | [("tab" | number)] | [("tab" | number), {
7272
7283
  const?: (number | ("first" | "off"));
7273
7284
  using?: (number | ("first" | "off"));
7274
7285
  });
7286
+ assignmentOperator?: (number | "off");
7275
7287
  outerIIFEBody?: (number | "off");
7276
7288
  MemberExpression?: (number | "off");
7277
7289
  FunctionDeclaration?: {
@@ -7504,6 +7516,22 @@ type StylisticKeywordSpacing = [] | [{
7504
7516
  before?: boolean;
7505
7517
  after?: boolean;
7506
7518
  };
7519
+ arguments?: {
7520
+ before?: boolean;
7521
+ after?: boolean;
7522
+ };
7523
+ as?: {
7524
+ before?: boolean;
7525
+ after?: boolean;
7526
+ };
7527
+ async?: {
7528
+ before?: boolean;
7529
+ after?: boolean;
7530
+ };
7531
+ await?: {
7532
+ before?: boolean;
7533
+ after?: boolean;
7534
+ };
7507
7535
  boolean?: {
7508
7536
  before?: boolean;
7509
7537
  after?: boolean;
@@ -7568,6 +7596,10 @@ type StylisticKeywordSpacing = [] | [{
7568
7596
  before?: boolean;
7569
7597
  after?: boolean;
7570
7598
  };
7599
+ eval?: {
7600
+ before?: boolean;
7601
+ after?: boolean;
7602
+ };
7571
7603
  export?: {
7572
7604
  before?: boolean;
7573
7605
  after?: boolean;
@@ -7596,10 +7628,18 @@ type StylisticKeywordSpacing = [] | [{
7596
7628
  before?: boolean;
7597
7629
  after?: boolean;
7598
7630
  };
7631
+ from?: {
7632
+ before?: boolean;
7633
+ after?: boolean;
7634
+ };
7599
7635
  function?: {
7600
7636
  before?: boolean;
7601
7637
  after?: boolean;
7602
7638
  };
7639
+ get?: {
7640
+ before?: boolean;
7641
+ after?: boolean;
7642
+ };
7603
7643
  goto?: {
7604
7644
  before?: boolean;
7605
7645
  after?: boolean;
@@ -7632,6 +7672,10 @@ type StylisticKeywordSpacing = [] | [{
7632
7672
  before?: boolean;
7633
7673
  after?: boolean;
7634
7674
  };
7675
+ let?: {
7676
+ before?: boolean;
7677
+ after?: boolean;
7678
+ };
7635
7679
  long?: {
7636
7680
  before?: boolean;
7637
7681
  after?: boolean;
@@ -7648,6 +7692,10 @@ type StylisticKeywordSpacing = [] | [{
7648
7692
  before?: boolean;
7649
7693
  after?: boolean;
7650
7694
  };
7695
+ of?: {
7696
+ before?: boolean;
7697
+ after?: boolean;
7698
+ };
7651
7699
  package?: {
7652
7700
  before?: boolean;
7653
7701
  after?: boolean;
@@ -7668,6 +7716,10 @@ type StylisticKeywordSpacing = [] | [{
7668
7716
  before?: boolean;
7669
7717
  after?: boolean;
7670
7718
  };
7719
+ set?: {
7720
+ before?: boolean;
7721
+ after?: boolean;
7722
+ };
7671
7723
  short?: {
7672
7724
  before?: boolean;
7673
7725
  after?: boolean;
@@ -7712,59 +7764,43 @@ type StylisticKeywordSpacing = [] | [{
7712
7764
  before?: boolean;
7713
7765
  after?: boolean;
7714
7766
  };
7715
- typeof?: {
7716
- before?: boolean;
7717
- after?: boolean;
7718
- };
7719
- var?: {
7720
- before?: boolean;
7721
- after?: boolean;
7722
- };
7723
- void?: {
7724
- before?: boolean;
7725
- after?: boolean;
7726
- };
7727
- volatile?: {
7728
- before?: boolean;
7729
- after?: boolean;
7730
- };
7731
- while?: {
7767
+ type?: {
7732
7768
  before?: boolean;
7733
7769
  after?: boolean;
7734
7770
  };
7735
- with?: {
7771
+ typeof?: {
7736
7772
  before?: boolean;
7737
7773
  after?: boolean;
7738
7774
  };
7739
- accessor?: {
7775
+ using?: {
7740
7776
  before?: boolean;
7741
7777
  after?: boolean;
7742
7778
  };
7743
- as?: {
7779
+ var?: {
7744
7780
  before?: boolean;
7745
7781
  after?: boolean;
7746
7782
  };
7747
- async?: {
7783
+ void?: {
7748
7784
  before?: boolean;
7749
7785
  after?: boolean;
7750
7786
  };
7751
- await?: {
7787
+ volatile?: {
7752
7788
  before?: boolean;
7753
7789
  after?: boolean;
7754
7790
  };
7755
- from?: {
7791
+ while?: {
7756
7792
  before?: boolean;
7757
7793
  after?: boolean;
7758
7794
  };
7759
- get?: {
7795
+ with?: {
7760
7796
  before?: boolean;
7761
7797
  after?: boolean;
7762
7798
  };
7763
- let?: {
7799
+ yield?: {
7764
7800
  before?: boolean;
7765
7801
  after?: boolean;
7766
7802
  };
7767
- of?: {
7803
+ accessor?: {
7768
7804
  before?: boolean;
7769
7805
  after?: boolean;
7770
7806
  };
@@ -7772,22 +7808,6 @@ type StylisticKeywordSpacing = [] | [{
7772
7808
  before?: boolean;
7773
7809
  after?: boolean;
7774
7810
  };
7775
- set?: {
7776
- before?: boolean;
7777
- after?: boolean;
7778
- };
7779
- using?: {
7780
- before?: boolean;
7781
- after?: boolean;
7782
- };
7783
- yield?: {
7784
- before?: boolean;
7785
- after?: boolean;
7786
- };
7787
- type?: {
7788
- before?: boolean;
7789
- after?: boolean;
7790
- };
7791
7811
  };
7792
7812
  }];
7793
7813
  // ----- @stylistic/line-comment-position -----
@@ -7987,6 +8007,7 @@ type StylisticNoExtraParens = ([] | ["functions"] | [] | ["all"] | ["all", {
7987
8007
  LogicalExpression?: boolean;
7988
8008
  AwaitExpression?: boolean;
7989
8009
  };
8010
+ ignoredNodes?: string[];
7990
8011
  }]);
7991
8012
  // ----- @stylistic/no-mixed-operators -----
7992
8013
  type StylisticNoMixedOperators = [] | [{
@@ -8102,7 +8123,7 @@ type StylisticPaddedBlocks = [] | [(("always" | "never" | "start" | "end") | {
8102
8123
  // ----- @stylistic/padding-line-between-statements -----
8103
8124
  type _StylisticPaddingLineBetweenStatementsPaddingType = ("any" | "never" | "always");
8104
8125
  type _StylisticPaddingLineBetweenStatementsStatementOption = (_StylisticPaddingLineBetweenStatementsStatementType | [_StylisticPaddingLineBetweenStatementsStatementType, ...(_StylisticPaddingLineBetweenStatementsStatementType)[]]);
8105
- type _StylisticPaddingLineBetweenStatementsStatementType = ("*" | "exports" | "require" | "directive" | "iife" | "block" | "empty" | "function" | "ts-method" | "break" | "case" | "class" | "continue" | "debugger" | "default" | "do" | "for" | "if" | "import" | "return" | "switch" | "throw" | "try" | "while" | "with" | "cjs-export" | "cjs-import" | "enum" | "interface" | "type" | "function-overload" | "block-like" | "singleline-block-like" | "multiline-block-like" | "expression" | "singleline-expression" | "multiline-expression" | "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");
8126
+ 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");
8106
8127
  type StylisticPaddingLineBetweenStatements = {
8107
8128
  blankLine: _StylisticPaddingLineBetweenStatementsPaddingType;
8108
8129
  prev: _StylisticPaddingLineBetweenStatementsStatementOption;
@@ -10378,6 +10399,7 @@ type JsdocRequireReturnsType = [] | [{
10378
10399
  }];
10379
10400
  // ----- jsdoc/require-template -----
10380
10401
  type JsdocRequireTemplate = [] | [{
10402
+ exemptedBy?: string[];
10381
10403
  requireSeparateTemplates?: boolean;
10382
10404
  }];
10383
10405
  // ----- jsdoc/require-throws -----
package/dist/index.js CHANGED
@@ -481,10 +481,10 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
481
481
  isReactEnabled && unwrap(import("./react-DD9VDtyi.js")),
482
482
  isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
483
483
  isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
484
- isJestEnabled && unwrap(import("./jest-BhHoh4EB.js")),
485
- isVitestEnabled && unwrap(import("./vitest-DpQEe80J.js")),
484
+ isJestEnabled && unwrap(import("./jest-G-dRTY_j.js")),
485
+ isVitestEnabled && unwrap(import("./vitest-C38KvCT7.js")),
486
486
  isTestingLibraryEnabled && unwrap(import("./testing-library-lJsmjyFo.js")),
487
- isPlaywrightEnabled && unwrap(import("./playwright-Cyd4gThA.js")),
487
+ isPlaywrightEnabled && unwrap(import("./playwright-ywSmTTAR.js")),
488
488
  isStorybookEnabled && unwrap(import("./storybook-BO4plVPp.js")),
489
489
  isNextjsEnabled && unwrap(import("./nextjs-X6g9xH_I.js"))
490
490
  ]);
@@ -23,6 +23,7 @@ const jestRules = async () => {
23
23
  "jest/no-restricted-matchers": "off",
24
24
  "jest/no-test-return-statement": "error",
25
25
  "jest/no-untyped-mock-factory": "off",
26
+ "jest/padding-around-all": "error",
26
27
  "jest/prefer-called-with": "error",
27
28
  "jest/prefer-comparison-matcher": "error",
28
29
  "jest/prefer-each": "error",
@@ -31,6 +32,7 @@ const jestRules = async () => {
31
32
  "jest/prefer-expect-resolves": "error",
32
33
  "jest/prefer-hooks-in-order": "error",
33
34
  "jest/prefer-hooks-on-top": "error",
35
+ "jest/prefer-jest-mocked": "error",
34
36
  "jest/prefer-lowercase-title": "off",
35
37
  "jest/prefer-mock-promise-shorthand": "error",
36
38
  "jest/prefer-snapshot-hint": "error",
@@ -21,6 +21,12 @@ const playwrightRules = async () => {
21
21
  "playwright/no-useless-not": "error",
22
22
  "playwright/no-wait-for-selector": "error",
23
23
  "playwright/no-wait-for-timeout": "error",
24
+ "playwright/prefer-strict-equal": "error",
25
+ "playwright/prefer-to-be": "error",
26
+ "playwright/prefer-to-contain": "error",
27
+ "playwright/prefer-to-have-count": "error",
28
+ "playwright/prefer-to-have-length": "error",
29
+ "playwright/require-to-throw-message": "error",
24
30
  "playwright/valid-title": "off"
25
31
  };
26
32
  };
@@ -11,6 +11,7 @@ const vitestRules = async () => {
11
11
  withinDescribe: "it"
12
12
  }],
13
13
  "vitest/consistent-vitest-vi": "error",
14
+ "vitest/hoisted-apis-on-top": "error",
14
15
  "vitest/no-alias-methods": "error",
15
16
  "vitest/no-commented-out-tests": "error",
16
17
  "vitest/no-conditional-in-test": "error",
@@ -27,6 +28,7 @@ const vitestRules = async () => {
27
28
  "vitest/no-standalone-expect": "error",
28
29
  "vitest/no-test-prefixes": "error",
29
30
  "vitest/no-test-return-statement": "error",
31
+ "vitest/padding-around-all": "error",
30
32
  "vitest/prefer-called-once": "error",
31
33
  "vitest/prefer-called-times": "off",
32
34
  "vitest/prefer-called-with": "error",
@@ -35,6 +37,7 @@ const vitestRules = async () => {
35
37
  "vitest/prefer-equality-matcher": "error",
36
38
  "vitest/prefer-expect-assertions": "off",
37
39
  "vitest/prefer-expect-resolves": "error",
40
+ "vitest/prefer-expect-type-of": "error",
38
41
  "vitest/prefer-hooks-in-order": "error",
39
42
  "vitest/prefer-hooks-on-top": "error",
40
43
  "vitest/prefer-lowercase-title": "off",
@@ -47,6 +50,7 @@ const vitestRules = async () => {
47
50
  "vitest/prefer-to-contain": "error",
48
51
  "vitest/prefer-to-have-length": "error",
49
52
  "vitest/prefer-todo": "warn",
53
+ "vitest/prefer-vi-mocked": "error",
50
54
  "vitest/require-hook": "error",
51
55
  "vitest/require-to-throw-message": "error",
52
56
  "vitest/require-top-level-describe": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "6.6.0",
3
+ "version": "6.8.0",
4
4
  "description": "A simple, modern ESLint config that covers most use cases.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -40,15 +40,15 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
43
- "@eslint-react/eslint-plugin": "2.0.0-next.153",
43
+ "@eslint-react/eslint-plugin": "2.0.0-next.166",
44
44
  "@eslint/js": "^9.34.0",
45
45
  "@next/eslint-plugin-next": "^15.5.2",
46
- "@stylistic/eslint-plugin": "^5.2.3",
47
- "@tanstack/eslint-plugin-query": "^5.83.1",
46
+ "@stylistic/eslint-plugin": "^5.3.1",
47
+ "@tanstack/eslint-plugin-query": "^5.86.0",
48
48
  "@types/eslint": "9.6.1",
49
- "@typescript-eslint/parser": "^8.41.0",
50
- "@typescript-eslint/utils": "^8.41.0",
51
- "@vitest/eslint-plugin": "^1.3.4",
49
+ "@typescript-eslint/parser": "^8.42.0",
50
+ "@typescript-eslint/utils": "^8.42.0",
51
+ "@vitest/eslint-plugin": "^1.3.8",
52
52
  "astro-eslint-parser": "^1.2.2",
53
53
  "eslint-config-flat-gitignore": "^2.1.0",
54
54
  "eslint-config-prettier": "^10.1.8",
@@ -57,7 +57,7 @@
57
57
  "eslint-plugin-import-x": "^4.16.1",
58
58
  "eslint-plugin-jest": "^29.0.1",
59
59
  "eslint-plugin-jest-dom": "^5.5.0",
60
- "eslint-plugin-jsdoc": "^54.1.1",
60
+ "eslint-plugin-jsdoc": "^54.3.1",
61
61
  "eslint-plugin-jsx-a11y": "^6.10.2",
62
62
  "eslint-plugin-n": "^17.21.3",
63
63
  "eslint-plugin-perfectionist": "^4.15.0",
@@ -67,11 +67,11 @@
67
67
  "eslint-plugin-react-refresh": "0.4.20",
68
68
  "eslint-plugin-regexp": "^2.10.0",
69
69
  "eslint-plugin-storybook": "0.12.0",
70
- "eslint-plugin-testing-library": "^7.6.6",
70
+ "eslint-plugin-testing-library": "^7.6.8",
71
71
  "eslint-plugin-unicorn": "^60.0.0",
72
72
  "globals": "^16.3.0",
73
73
  "local-pkg": "^1.1.2",
74
- "typescript-eslint": "^8.41.0"
74
+ "typescript-eslint": "^8.42.0"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "eslint": "^9.10.0"