Skip to content

Commit c28faf2

Browse files
authored
build: bump eslint (#4325)
eslint-plugin-react-hooks now works with eslint 9 and do not require @eslint/compat wrapper.
1 parent 73dd80a commit c28faf2

File tree

5 files changed

+95
-115
lines changed

5 files changed

+95
-115
lines changed

apps/builder/app/builder/shared/sync/sync-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export const startProjectSync = ({
272272
});
273273
};
274274

275-
const useSyncProject = async ({
275+
const useSyncProject = ({
276276
projectId,
277277
authPermit,
278278
}: {

apps/builder/app/shared/hook-utils/effect-event.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const useEffectEvent = <T extends Function>(callback?: T) => {
1515
ref.current = callback;
1616
});
1717

18-
// eslint-disable-next-line react-hooks/exhaustive-deps
1918
return useCallback<T>(
2019
((...args: unknown[]) => ref.current?.(...args)) as never,
2120
[]

eslint.config.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22

33
import eslint from "@eslint/js";
4-
import { fixupPluginRules } from "@eslint/compat";
54
import tseslint from "typescript-eslint";
65
import reactHooks from "eslint-plugin-react-hooks";
76
import unicorn from "eslint-plugin-unicorn";
@@ -22,8 +21,7 @@ export default tseslint.config({
2221
...tseslint.configs.recommended,
2322
{
2423
plugins: {
25-
// @ts-ignore
26-
"react-hooks": fixupPluginRules(reactHooks),
24+
"react-hooks": /** @type {any} */ (reactHooks),
2725
unicorn,
2826
},
2927
},

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
"pre-commit": "./node_modules/.bin/nano-staged"
2525
},
2626
"devDependencies": {
27-
"@eslint/compat": "^1.2.0",
28-
"@eslint/js": "^9.12.0",
27+
"@eslint/js": "^9.13.0",
2928
"@fontsource-variable/inter": "^5.0.20",
3029
"@fontsource-variable/manrope": "^5.0.20",
3130
"@fontsource/roboto-mono": "^5.0.18",
@@ -40,8 +39,8 @@
4039
"@types/node": "^22.6.1",
4140
"@types/react": "^18.2.70",
4241
"esbuild": "^0.24.0",
43-
"eslint": "^9.12.0",
44-
"eslint-plugin-react-hooks": "^4.6.2",
42+
"eslint": "^9.13.0",
43+
"eslint-plugin-react-hooks": "^5.0.0",
4544
"eslint-plugin-unicorn": "^56.0.0",
4645
"jest": "^29.7.0",
4746
"nano-staged": "^0.8.0",
@@ -52,7 +51,7 @@
5251
"storybook": "^8.3.5",
5352
"tsx": "^4.19.1",
5453
"typescript": "5.5.2",
55-
"typescript-eslint": "^8.8.0",
54+
"typescript-eslint": "^8.11.0",
5655
"vite": "^5.4.8"
5756
},
5857
"engines": {

0 commit comments

Comments
 (0)