From d09f06bab1e62db327525581579c73925a44cb68 Mon Sep 17 00:00:00 2001 From: dimapaloskin Date: Sun, 11 Nov 2018 13:43:09 +0300 Subject: [PATCH] add eslint-plugin-react-hooks --- .eslintrc | 4 +++- package.json | 1 + yarn.lock | 15 +++++---------- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.eslintrc b/.eslintrc index 92e161c..16cedac 100644 --- a/.eslintrc +++ b/.eslintrc @@ -7,6 +7,7 @@ "plugins": [ "react", "flowtype", + "react-hooks", "jest" ], "rules": { @@ -14,7 +15,8 @@ "comma-dangle": 0, "flowtype/require-valid-file-annotation": 2, "no-unused-expressions": 0, - "flowtype/no-unused-expressions": 2 + "flowtype/no-unused-expressions": 2, + "react-hooks/rules-of-hooks": "error" }, "env": { "jest/globals": true diff --git a/package.json b/package.json index 3751b69..d1140c2 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "eslint-plugin-node": "^8.0.0", "eslint-plugin-promise": "^4.0.1", "eslint-plugin-react": "^7.11.1", + "eslint-plugin-react-hooks": "^0.0.0", "eslint-plugin-standard": "^4.0.0", "flow-bin": "^0.86.0", "jest": "^23.6.0", diff --git a/yarn.lock b/yarn.lock index d1aa838..3875f0a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1627,6 +1627,11 @@ eslint-plugin-promise@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz#2d074b653f35a23d1ba89d8e976a985117d1c6a2" +eslint-plugin-react-hooks@^0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-0.0.0.tgz#9988f14082a159931c3dfa9ba699130457da927a" + integrity sha512-SXyU7C3E8AJbXKMdb10P/zHazcxzfuWR5OFwAVZKXVU7P/H56NLszVG6WdQBo9Pt80FfnPXtUGGbWhs3/98N4w== + eslint-plugin-react@^7.11.1: version "7.11.1" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz#c01a7af6f17519457d6116aa94fc6d2ccad5443c" @@ -3783,16 +3788,6 @@ react-test-renderer@^16.7.0-alpha.0: react-is "^16.7.0-alpha.0" scheduler "^0.11.0-alpha.0" -react@^16.7.0-alpha.0: - version "16.7.0-alpha.0" - resolved "https://registry.yarnpkg.com/react/-/react-16.7.0-alpha.0.tgz#e2ed4abe6f268c9b092a1d1e572953684d1783a9" - integrity sha512-V0za4H01aoAF0SdzahHepvfvzTQ1xxkgMX4z8uKzn+wzZAlVk0IVpleqyxZWluqmdftNedj6fIIZRO/rVYVFvQ== - dependencies: - loose-envify "^1.1.0" - object-assign "^4.1.1" - prop-types "^15.6.2" - scheduler "^0.11.0-alpha.0" - read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"