diff options
author | Sunil Shetye | 2025-06-04 11:06:44 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-06-04 11:06:44 +0530 |
commit | 1b6a7150ff71f61e29cb1a8776178b38c7246915 (patch) | |
tree | 68b43e62f44f5c4a82580f1178c67a873bb5b5d7 | |
parent | 7c0d0726c33102fb866da880f6dfac10fa7bbcbe (diff) | |
download | Common-Interface-Project-1b6a7150ff71f61e29cb1a8776178b38c7246915.tar.gz Common-Interface-Project-1b6a7150ff71f61e29cb1a8776178b38c7246915.tar.bz2 Common-Interface-Project-1b6a7150ff71f61e29cb1a8776178b38c7246915.zip |
fix eslint config for react
-rw-r--r-- | blocks/eda-frontend/eslint.config.mjs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/blocks/eda-frontend/eslint.config.mjs b/blocks/eda-frontend/eslint.config.mjs index 89aef643..929127b9 100644 --- a/blocks/eda-frontend/eslint.config.mjs +++ b/blocks/eda-frontend/eslint.config.mjs @@ -17,7 +17,9 @@ export default [ parserOptions: { requireConfigFile: false, babelOptions: { - presets: ['@babel/preset-react'] + presets: [ + ['@babel/preset-react', { runtime: 'automatic' }] + ] }, ecmaFeatures: { jsx: true @@ -63,9 +65,10 @@ export default [ 'prefer-const': 'error', // React/React Hooks + 'react/jsx-uses-vars': 'error', 'react/react-in-jsx-scope': 'off', - 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'warn' + 'react-hooks/exhaustive-deps': 'warn', + 'react-hooks/rules-of-hooks': 'error' } } ] |