From a88e4d7274b9c58e532b837df2df39817e754223 Mon Sep 17 00:00:00 2001 From: GW_MC <72297530+GWMCwing@users.noreply.github.com> Date: Sat, 20 Dec 2025 13:17:09 +0800 Subject: [PATCH] feat: add React and React Hooks support to ESLint configuration --- apps/frontend/eslint.config.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/frontend/eslint.config.ts b/apps/frontend/eslint.config.ts index ec18c0f..0c1d889 100644 --- a/apps/frontend/eslint.config.ts +++ b/apps/frontend/eslint.config.ts @@ -1,6 +1,8 @@ import js from '@eslint/js'; import globals from 'globals'; import tseslint from 'typescript-eslint'; +import pluginReact from 'eslint-plugin-react'; +import pluginReactHooks from 'eslint-plugin-react-hooks'; export default tseslint.config( { @@ -22,5 +24,19 @@ export default tseslint.config( }, }, rules: {}, + }, + { + ...pluginReact.configs.flat.recommended, // Enables core React rules + ...pluginReactHooks.configs.flat.recommended, // Enables React Hooks rules + languageOptions: { + parserOptions: { + ecmaFeatures: { + jsx: true, + }, + }, + globals: { + ...globals.browser, + }, + }, } );