Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
feature: add react-hooks plugin for eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Brud committed Feb 23, 2024
1 parent c0edb70 commit 192f1d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ module.exports = {
ecmaVersion: 'latest',
sourceType: 'module',
},
plugins: ['react', 'simple-import-sort'],
plugins: ['react', 'simple-import-sort', 'react-hooks'],
rules: {
'simple-import-sort/imports': 'error',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
globals: {
module: true,
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^12.0.0",
"husky": "^8.0.0",
"jest-junit": "^16.0.0",
Expand All @@ -61,6 +62,8 @@
]
},
"jest": {
"coverageReporters": ["jest-junit"]
"coverageReporters": [
"jest-junit"
]
}
}

0 comments on commit 192f1d9

Please sign in to comment.