From 1fe0dd9fb9a43188d62a15595208a60c9e3587c7 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Thu, 19 Dec 2024 10:54:50 +0900 Subject: [PATCH 1/2] chore(configs/eslint-config): fix and add eslint-plugin-react-hooks recommended rules --- configs/eslint-config/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/eslint-config/index.js b/configs/eslint-config/index.js index 4f845b33b..0861213b5 100644 --- a/configs/eslint-config/index.js +++ b/configs/eslint-config/index.js @@ -119,7 +119,7 @@ export const suspensiveReactTypeScriptConfig = tseslint.config( }, { plugins: { - 'react-hooks': reactHooks.configs.recommended, + 'react-hooks': reactHooks, 'react-compiler': reactCompiler, }, languageOptions: { @@ -128,6 +128,7 @@ export const suspensiveReactTypeScriptConfig = tseslint.config( }, }, rules: { + ...reactHooks.configs.recommended.rules, 'react-compiler/react-compiler': 'warn', }, settings: { From bdfb6273361ba186f70181dbf2ff8a4f17866b33 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Thu, 19 Dec 2024 11:02:04 +0900 Subject: [PATCH 2/2] fix(docs/suspensive.org/theme.config.tsx): apply eslint-plugin-react-hooks recommended rules --- docs/suspensive.org/theme.config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/suspensive.org/theme.config.tsx b/docs/suspensive.org/theme.config.tsx index 124dae950..069f9c1ba 100644 --- a/docs/suspensive.org/theme.config.tsx +++ b/docs/suspensive.org/theme.config.tsx @@ -123,7 +123,7 @@ const config: DocsThemeConfig = { float: true, }, navigation: true, - main: ({ children }) => { + main: function Main({ children }) { const router = useRouter() return (