From bdd66de62b64d252a608480d2c0ed93ef02f8f46 Mon Sep 17 00:00:00 2001 From: Wonsuk Choi Date: Thu, 19 Dec 2024 13:05:14 +0900 Subject: [PATCH] chore(configs/eslint-config): fix and add eslint-plugin-react-hooks recommended rules (#1399) # Overview * fix and add `eslint-plugin-react-hooks` recommended rules ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md) 2. I added documents and tests. --- configs/eslint-config/index.js | 3 ++- docs/suspensive.org/theme.config.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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: { 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 (