Skip to content

Commit

Permalink
Merge pull request #352 from MetroStar/eslint-plugin-react-hooks
Browse files Browse the repository at this point in the history
Add ESLint Plugin React Hooks
  • Loading branch information
jbouder authored Oct 11, 2024
2 parents 817679d + 5d3b418 commit d4e97fb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pluginJs from '@eslint/js';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import reactPlugin from 'eslint-plugin-react';
import hooksPlugin from 'eslint-plugin-react-hooks';
import tseslint from 'typescript-eslint';

export default [
Expand Down Expand Up @@ -46,8 +47,12 @@ export default [
},
},
{
plugins: {
'react-hooks': hooksPlugin,
},
rules: {
'react/react-in-jsx-scope': 'off',
...hooksPlugin.configs.recommended.rules,
},
ignores: ['*.test.tsx'],
},
Expand Down
13 changes: 13 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "5.0.0",
"gh-pages": "^6.1.1",
"mochawesome": "^7.1.3",
"mochawesome-merge": "^4.3.0",
Expand Down

0 comments on commit d4e97fb

Please sign in to comment.