diff --git a/.eslintrc.json b/.eslintrc.json index b1fe5d2..e660dc9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,7 @@ }, "sourceType": "module" }, - "plugins": ["flowtype", "react"], + "plugins": ["flowtype", "react", "react-hooks"], "rules": { "indent": ["error", 4, { @@ -28,6 +28,9 @@ "react/jsx-indent": ["error", 4], "semi": ["error", "always", { "omitLastInOneLineBlock": true }], + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "error", + "camelcase": "off", "comma-dangle": "off", "curly": "off", diff --git a/package.json b/package.json index cc9e88a..8b00bcd 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "eslint-plugin-node": "^10.0.0", "eslint-plugin-promise": "^4.2.1", "eslint-plugin-react": "^7.14.3", + "eslint-plugin-react-hooks": "^2.1.2", "eslint-plugin-standard": "^4.0.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", "htmlparser": "^1.7.7",