Skip to content

Commit

Permalink
build: bump eslint
Browse files Browse the repository at this point in the history
eslint-plugin-react-hooks now works with eslint 9 and do not require
@eslint/compat wrapper.
  • Loading branch information
TrySound committed Oct 22, 2024
1 parent 7c23583 commit 468111a
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 111 deletions.
2 changes: 1 addition & 1 deletion apps/builder/app/builder/shared/sync/sync-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ export const startProjectSync = ({
});
};

const useSyncProject = async ({
const useSyncProject = ({
projectId,
authPermit,
}: {
Expand Down
1 change: 0 additions & 1 deletion apps/builder/app/shared/hook-utils/effect-event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const useEffectEvent = <T extends Function>(callback?: T) => {
ref.current = callback;
});

// eslint-disable-next-line react-hooks/exhaustive-deps
return useCallback<T>(
((...args: unknown[]) => ref.current?.(...args)) as never,
[]
Expand Down
4 changes: 1 addition & 3 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @ts-check

import eslint from "@eslint/js";
import { fixupPluginRules } from "@eslint/compat";
import tseslint from "typescript-eslint";
import reactHooks from "eslint-plugin-react-hooks";
import unicorn from "eslint-plugin-unicorn";
Expand All @@ -22,8 +21,7 @@ export default tseslint.config({
...tseslint.configs.recommended,
{
plugins: {
// @ts-ignore
"react-hooks": fixupPluginRules(reactHooks),
"react-hooks": /** @type {any} */ (reactHooks),
unicorn,
},
},
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
"pre-commit": "./node_modules/.bin/nano-staged"
},
"devDependencies": {
"@eslint/compat": "^1.2.0",
"@eslint/js": "^9.12.0",
"@eslint/js": "^9.13.0",
"@fontsource-variable/inter": "^5.0.20",
"@fontsource-variable/manrope": "^5.0.20",
"@fontsource/roboto-mono": "^5.0.18",
Expand All @@ -40,8 +39,8 @@
"@types/node": "^22.6.1",
"@types/react": "^18.2.70",
"esbuild": "^0.24.0",
"eslint": "^9.12.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint": "^9.13.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-unicorn": "^56.0.0",
"jest": "^29.7.0",
"nano-staged": "^0.8.0",
Expand All @@ -52,7 +51,7 @@
"storybook": "^8.3.5",
"tsx": "^4.19.1",
"typescript": "5.5.2",
"typescript-eslint": "^8.8.0",
"typescript-eslint": "^8.10.0",
"vite": "^5.4.8"
},
"engines": {
Expand Down
Loading

0 comments on commit 468111a

Please sign in to comment.