Skip to content

Commit bd1dad0

Browse files
committed
feat: wrap functions in useCallback
1 parent fa43116 commit bd1dad0

File tree

4 files changed

+195
-154
lines changed

4 files changed

+195
-154
lines changed

.eslintrc

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"parserOptions": {
55
"project": ["./tsconfig.json", "rollup.config.js"]
66
},
7-
"plugins": ["@typescript-eslint"],
7+
"plugins": ["@typescript-eslint", "react-hooks"],
88
"extends": [
99
"eslint:recommended",
1010
"plugin:@typescript-eslint/recommended",
@@ -20,6 +20,8 @@
2020
},
2121
"rules": {
2222
"react/jsx-sort-props": "error",
23-
"react/sort-prop-types": "error"
23+
"react/sort-prop-types": "error",
24+
"react-hooks/rules-of-hooks": "error",
25+
"react-hooks/exhaustive-deps": "warn"
2426
}
2527
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"eslint-plugin-node": "^11.1.0",
9393
"eslint-plugin-promise": "^6.0.1",
9494
"eslint-plugin-react": "^7.31.8",
95+
"eslint-plugin-react-hooks": "^4.6.0",
9596
"eslint-plugin-typescript-sort-keys": "^2.1.0",
9697
"npm-run-all": "^4.1.5",
9798
"postcss": "^8.4.16",

0 commit comments

Comments
 (0)