Skip to content

Commit d21e02b

Browse files
committed
Upgrade ESLint to 9.39.1 and add disableProblemticEslintJsRules
- Add disableProblemticEslintJsRules export and include in config - Bump eslint to 9.39.1 across packages and update lockfiles
1 parent 635f7d6 commit d21e02b

File tree

14 files changed

+102
-61
lines changed

14 files changed

+102
-61
lines changed

.pkgs/configs/eslint.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ export declare const GLOB_SCRIPTS: string[];
88
export declare const GLOB_IGNORES: readonly ["**/node_modules", "**/dist", "**/package-lock.json", "**/yarn.lock", "**/pnpm-lock.yaml", "**/bun.lockb", "**/output", "**/coverage", "**/temp", "**/.temp", "**/tmp", "**/.tmp", "**/.history", "**/.vitepress/cache", "**/.nuxt", "**/.next", "**/.vercel", "**/.changeset", "**/.idea", "**/.cache", "**/.output", "**/.vite-inspect", "**/.yarn", "**/storybook-static", "**/.eslint-config-inspector", "**/playwright-report", "**/.astro", "**/.vinxi", "**/app.config.timestamp_*.js", "**/.tanstack", "**/.nitro", "**/CHANGELOG*.md", "**/*.min.*", "**/LICENSE*", "**/__snapshots__", "**/auto-import?(s).d.ts", "**/components.d.ts", "**/vite.config.ts.*.mjs", "**/*.gen.*", "!.storybook"];
99
export declare const strictTypeChecked: Linter.Config[];
1010
export declare const disableTypeChecked: Linter.Config[];
11+
/**
12+
* Common ESLint JS rules to disable that are problematic when using TypeScript.
13+
*/
14+
export declare const disableProblemticEslintJsRules: Linter.Config;

.pkgs/configs/eslint.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ export const strictTypeChecked = defineConfig([
104104
"no-else-return": "error",
105105
"no-fallthrough": ["error", { commentPattern: ".*intentional fallthrough.*" }],
106106
"no-implicit-coercion": ["error", { allow: ["!!"] }],
107-
"no-mixed-operators": "warn",
108-
"no-undef": "off",
109107
"prefer-object-has-own": "error",
110108
"no-restricted-syntax": [
111109
"error",
@@ -214,3 +212,13 @@ export const disableTypeChecked = defineConfig([
214212
},
215213
},
216214
]);
215+
/**
216+
* Common ESLint JS rules to disable that are problematic when using TypeScript.
217+
*/
218+
export const disableProblemticEslintJsRules = {
219+
rules: {
220+
// handled by TypeScript
221+
"no-dupe-args": "off",
222+
"no-unused-vars": "off",
223+
},
224+
};

.pkgs/configs/eslint.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,6 @@ export const strictTypeChecked: Linter.Config[] = defineConfig([
114114
"no-else-return": "error",
115115
"no-fallthrough": ["error", { commentPattern: ".*intentional fallthrough.*" }],
116116
"no-implicit-coercion": ["error", { allow: ["!!"] }],
117-
"no-mixed-operators": "warn",
118-
"no-undef": "off",
119117
"prefer-object-has-own": "error",
120118

121119
"no-restricted-syntax": [
@@ -231,3 +229,13 @@ export const disableTypeChecked: Linter.Config[] = defineConfig([
231229
},
232230
},
233231
]);
232+
233+
/**
234+
* Common ESLint JS rules to disable that are problematic when using TypeScript.
235+
*/
236+
export const disableProblemticEslintJsRules: Linter.Config = {
237+
rules: {
238+
"no-dupe-args": "off",
239+
"no-unused-vars": "off",
240+
},
241+
};

apps/website/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@types/react": "^19.2.2",
4747
"@types/react-dom": "^19.2.2",
4848
"dedent": "^1.7.0",
49-
"eslint": "^9.38.0",
49+
"eslint": "^9.39.1",
5050
"eslint-plugin-fast-import": "^1.5.3",
5151
"eslint-plugin-react-hooks": "^7.0.1",
5252
"eslint-plugin-react-refresh": "^0.4.24",

eslint.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
GLOB_SCRIPTS,
88
GLOB_TESTS,
99
GLOB_TS,
10+
disableProblemticEslintJsRules,
1011
disableTypeChecked,
1112
strictTypeChecked,
1213
} from "@local/configs/eslint";
@@ -99,4 +100,5 @@ export default defineConfig([
99100
"local/avoid-multiline-template-expression": "off",
100101
},
101102
},
103+
disableProblemticEslintJsRules,
102104
]);

examples/next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@types/node": "^24.10.0",
2727
"@types/react": "^19.2.2",
2828
"@types/react-dom": "^19.2.2",
29-
"eslint": "^9.38.0",
29+
"eslint": "^9.39.1",
3030
"eslint-plugin-react-hooks": "^7.0.1",
3131
"eslint-plugin-react-refresh": "^0.4.24",
3232
"typescript": "^5.9.3",

examples/react-dom-js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@types/react": "^19.2.2",
2222
"@types/react-dom": "^19.2.2",
2323
"@vitejs/plugin-react": "^5.1.0",
24-
"eslint": "^9.38.0",
24+
"eslint": "^9.39.1",
2525
"eslint-plugin-react-hooks": "^7.0.1",
2626
"eslint-plugin-react-refresh": "^0.4.24",
2727
"globals": "^16.5.0",

examples/react-dom/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@types/react": "^19.2.2",
2525
"@types/react-dom": "^19.2.2",
2626
"@vitejs/plugin-react": "^5.1.0",
27-
"eslint": "^9.38.0",
27+
"eslint": "^9.39.1",
2828
"eslint-plugin-react-hooks": "^7.0.1",
2929
"eslint-plugin-react-refresh": "^0.4.24",
3030
"typescript": "^5.9.3",

examples/with-babel-eslint-parser/eslint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ import globals from "globals";
1313
import JSCONFIG_APP from "./jsconfig.app.json" with { type: "json" };
1414
import JSCONFIG_NODE from "./jsconfig.node.json" with { type: "json" };
1515

16+
const disableProblemticEslintJsRules = {
17+
rules: {
18+
// handled by TypeScript
19+
"no-dupe-args": "off",
20+
"no-unused-vars": "off",
21+
},
22+
};
23+
1624
export default defineConfig([
1725
// base configuration for browser environment source files
1826
{
@@ -71,4 +79,5 @@ export default defineConfig([
7179
eslintPluginReactHooks.configs.flat["recommended-latest"] ?? [],
7280
],
7381
},
82+
disableProblemticEslintJsRules,
7483
]);

examples/with-babel-eslint-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"@types/react": "^19.2.2",
2727
"@types/react-dom": "^19.2.2",
2828
"@vitejs/plugin-react": "^5.1.0",
29-
"eslint": "^9.38.0",
29+
"eslint": "^9.39.1",
3030
"eslint-plugin-react-debug": "workspace:*",
3131
"eslint-plugin-react-dom": "workspace:*",
3232
"eslint-plugin-react-hooks": "^7.0.1",

0 commit comments

Comments
 (0)