@jimmy.codes/eslint-config 6.14.0 → 6.14.2

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/index.d.ts CHANGED
@@ -3271,6 +3271,26 @@ interface RuleOptions {
3271
3271
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
3272
3272
  */
3273
3273
  'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
3274
+ /**
3275
+ * Prefers either function properties or method signatures
3276
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
3277
+ */
3278
+ 'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
3279
+ /**
3280
+ * Warns against use of the empty object type
3281
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
3282
+ */
3283
+ 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
3284
+ /**
3285
+ * Catches unnecessary template expressions such as string expressions within a template literal.
3286
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
3287
+ */
3288
+ 'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
3289
+ /**
3290
+ * Prefers function types over call signatures when there are no other properties.
3291
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
3292
+ */
3293
+ 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
3274
3294
  /**
3275
3295
  * Formats JSDoc type values.
3276
3296
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
@@ -6743,7 +6763,7 @@ interface RuleOptions {
6743
6763
  */
6744
6764
  'vars-on-top'?: Linter.RuleEntry<[]>;
6745
6765
  /**
6746
- * require .spec test file pattern
6766
+ * require test file pattern
6747
6767
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/consistent-test-filename.md
6748
6768
  */
6749
6769
  'vitest/consistent-test-filename'?: Linter.RuleEntry<VitestConsistentTestFilename>;
@@ -7193,7 +7213,6 @@ type EslintReactNoForbiddenProps = [] | [{
7193
7213
  includedNodes?: string[];
7194
7214
  prop: string;
7195
7215
  })[];
7196
- [k: string]: unknown | undefined;
7197
7216
  }];
7198
7217
  // ----- @eslint-react/no-useless-fragment -----
7199
7218
  type EslintReactNoUselessFragment = [] | [{
@@ -10653,6 +10672,18 @@ type JsdocTextEscaping = [] | [{
10653
10672
  escapeHTML?: boolean;
10654
10673
  escapeMarkdown?: boolean;
10655
10674
  }];
10675
+ // ----- jsdoc/ts-method-signature-style -----
10676
+ type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
10677
+ enableFixer?: boolean;
10678
+ }];
10679
+ // ----- jsdoc/ts-no-unnecessary-template-expression -----
10680
+ type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
10681
+ enableFixer?: boolean;
10682
+ }];
10683
+ // ----- jsdoc/ts-prefer-function-type -----
10684
+ type JsdocTsPreferFunctionType = [] | [{
10685
+ enableFixer?: boolean;
10686
+ }];
10656
10687
  // ----- jsdoc/type-formatting -----
10657
10688
  type JsdocTypeFormatting = [] | [{
10658
10689
  arrayBrackets?: ("angle" | "square");
package/dist/index.js CHANGED
@@ -120,12 +120,7 @@ const additionalRules = {
120
120
  "no-implicit-globals": "error",
121
121
  "no-lonely-if": "error",
122
122
  "no-loop-func": "error",
123
- "no-magic-numbers": ["error", { ignore: [
124
- 0,
125
- 1,
126
- -1,
127
- 2
128
- ] }],
123
+ "no-magic-numbers": "off",
129
124
  "no-new-wrappers": "error",
130
125
  "no-param-reassign": ["error", { props: true }],
131
126
  "no-promise-executor-return": "error",
@@ -484,7 +479,7 @@ const defineConfig = async ({ astro = false, autoDetect = true, gitignore = fals
484
479
  ];
485
480
  const featureConfigs = await Promise.all([
486
481
  isTypescriptEnabled && unwrap(import("./typescript-D8AT5dEv.js")),
487
- isReactEnabled && unwrap(import("./react-B1Uy4qg-.js")),
482
+ isReactEnabled && unwrap(import("./react-BnGlxfxv.js")),
488
483
  isTanstackQueryEnabled && unwrap(import("./tanstack-query-DqqVfxJs.js")),
489
484
  isAstroEnabled && unwrap(import("./astro-Cc3Rxusf.js")),
490
485
  isJestEnabled && unwrap(import("./jest-BCatBVvc.js")),
@@ -24,11 +24,14 @@ const reactRules = async () => {
24
24
  const [{ configs: reactConfigs }, jsxA11yPlugin] = await Promise.all([interopDefault(import("@eslint-react/eslint-plugin")), interopDefault(import("eslint-plugin-jsx-a11y"))]);
25
25
  const isUsingNextjs = hasNext();
26
26
  const isUsingVite = hasVite();
27
- const reactPluginRules = hasTypescript() ? reactConfigs["recommended-type-checked"].rules : reactConfigs.recommended.rules;
27
+ const reactPluginRules = hasTypescript() ? reactConfigs["strict-type-checked"].rules : reactConfigs.recommended.rules;
28
28
  return {
29
29
  ...jsxA11yPlugin.flatConfigs.recommended.rules,
30
30
  ...upwarn(reactPluginRules),
31
+ "@eslint-react/dom/no-missing-button-type": "error",
32
+ "@eslint-react/dom/no-missing-iframe-sandbox": "error",
31
33
  "@eslint-react/dom/no-string-style-prop": "error",
34
+ "@eslint-react/dom/no-unsafe-target-blank": "error",
32
35
  "@eslint-react/hooks-extra/no-direct-set-state-in-use-effect": "off",
33
36
  "@eslint-react/jsx-key-before-spread": "error",
34
37
  "@eslint-react/jsx-shorthand-boolean": "error",
@@ -40,6 +43,9 @@ const reactRules = async () => {
40
43
  "@eslint-react/no-unnecessary-key": "error",
41
44
  "@eslint-react/no-unnecessary-use-callback": "error",
42
45
  "@eslint-react/no-unnecessary-use-memo": "error",
46
+ "@eslint-react/no-unstable-context-value": "error",
47
+ "@eslint-react/no-unstable-default-props": "error",
48
+ "@eslint-react/no-unused-state": "error",
43
49
  "@eslint-react/no-useless-fragment": "error",
44
50
  "@eslint-react/prefer-namespace-import": "error",
45
51
  "react-compiler/react-compiler": "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "6.14.0",
3
+ "version": "6.14.2",
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.6",
44
- "@eslint/js": "^9.37.0",
45
- "@next/eslint-plugin-next": "^15.5.4",
43
+ "@eslint-react/eslint-plugin": "2.2.1",
44
+ "@eslint/js": "^9.38.0",
45
+ "@next/eslint-plugin-next": "^15.5.6",
46
46
  "@stylistic/eslint-plugin": "^5.4.0",
47
- "@tanstack/eslint-plugin-query": "^5.91.0",
47
+ "@tanstack/eslint-plugin-query": "^5.91.2",
48
48
  "@types/eslint": "9.6.1",
49
- "@typescript-eslint/parser": "^8.46.0",
50
- "@typescript-eslint/utils": "^8.46.0",
51
- "@vitest/eslint-plugin": "^1.3.16",
49
+ "@typescript-eslint/parser": "^8.46.1",
50
+ "@typescript-eslint/utils": "^8.46.1",
51
+ "@vitest/eslint-plugin": "^1.3.23",
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,21 +57,21 @@
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": "^61.0.1",
60
+ "eslint-plugin-jsdoc": "^61.1.4",
61
61
  "eslint-plugin-jsx-a11y": "^6.10.2",
62
62
  "eslint-plugin-n": "^17.23.1",
63
63
  "eslint-plugin-perfectionist": "^4.15.1",
64
64
  "eslint-plugin-playwright": "^2.2.2",
65
65
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
66
66
  "eslint-plugin-react-hooks": "^7.0.0",
67
- "eslint-plugin-react-refresh": "0.4.23",
67
+ "eslint-plugin-react-refresh": "0.4.24",
68
68
  "eslint-plugin-regexp": "^2.10.0",
69
69
  "eslint-plugin-storybook": "0.12.0",
70
- "eslint-plugin-testing-library": "^7.13.1",
70
+ "eslint-plugin-testing-library": "^7.13.3",
71
71
  "eslint-plugin-unicorn": "^61.0.2",
72
72
  "globals": "^16.4.0",
73
73
  "local-pkg": "^1.1.2",
74
- "typescript-eslint": "^8.46.0"
74
+ "typescript-eslint": "^8.46.1"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "eslint": "^9.10.0"