diff --git a/.eslintrc.js b/.eslintrc.js index 2ffbee8..81c796e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -200,6 +200,7 @@ module.exports = { 'react/jsx-sort-props': 'off', 'react/jsx-uses-react': 'error', 'react/jsx-uses-vars': 'error', + 'react-hooks/rules-of-hooks': 'error', // import errors 'import/no-unresolved': [ @@ -215,7 +216,7 @@ module.exports = { 'import/default': 'error', 'import/export': 'error' }, - plugins: ['react', 'css-modules', 'import', 'flowtype', 'cypress'], + plugins: ['react', 'react-hooks', 'css-modules', 'import', 'flowtype', 'cypress'], extends: [ 'plugin:css-modules/recommended', 'prettier', diff --git a/package.json b/package.json index 48946ab..5006a87 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "eslint-plugin-flowtype": "^3.0.0", "eslint-plugin-import": "^2.14.0", "eslint-plugin-react": "^7.11.1", + "eslint-plugin-react-hooks": "^1.0.1", "find-root": "^1.1.0", "typescript": "^3.1.3", "typescript-eslint-parser": "^20.0.0"