From 1aba0d87d1ae8f984664e49f30955a84006cb8a9 Mon Sep 17 00:00:00 2001 From: Tadayoshi Sato Date: Sun, 25 Sep 2022 13:19:25 +0900 Subject: [PATCH] chore(lint): add react-hooks lint --- .eslintrc.cjs | 1 + package.json | 3 ++- yarn.lock | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f413d374..97c22337 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -2,6 +2,7 @@ module.exports = { extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/recommended', + 'plugin:react-hooks/recommended', ], parser: '@typescript-eslint/parser', plugins: [ diff --git a/package.json b/package.json index ff90543a..273b84c3 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,8 @@ "@typescript-eslint/eslint-plugin": "^5.38.0", "@typescript-eslint/parser": "^5.38.0", "eslint": "^8.24.0", - "eslint-plugin-import": "^2.26.0" + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-react-hooks": "^4.6.0" }, "resolutions": { "@types/react": "17.0.45" diff --git a/yarn.lock b/yarn.lock index 0d01df0c..0f34c208 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4494,6 +4494,11 @@ eslint-plugin-react-hooks@^4.3.0: resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.5.0.tgz#5f762dfedf8b2cf431c689f533c9d3fa5dcf25ad" integrity sha512-8k1gRt7D7h03kd+SAAlzXkQwWK22BnK6GKZG+FJA6BAGy22CFvl8kCIXKpVux0cCxMWDQUPqSok0LKaZ0aOcCw== +eslint-plugin-react-hooks@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3" + integrity sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== + eslint-plugin-react@^7.27.1: version "7.30.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.30.0.tgz#8e7b1b2934b8426ac067a0febade1b13bd7064e3"