From 40a5690b4ced5b81c5df1692bdb7dc6c6f074493 Mon Sep 17 00:00:00 2001 From: Chris Watson Date: Sun, 29 Sep 2019 12:20:09 -0400 Subject: [PATCH 1/2] add eslint-plugin-react-hooks & accompanying rules --- eslintrc.json | 7 +++++-- package.json | 13 +++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/eslintrc.json b/eslintrc.json index 27f9598f..606518d6 100644 --- a/eslintrc.json +++ b/eslintrc.json @@ -14,7 +14,8 @@ }, "plugins": [ - "react" + "react", + "react-hooks" ], "extends": [ @@ -31,6 +32,8 @@ "react/no-unknown-property": "error", "react/no-unused-prop-types": "error", "react/prop-types": "error", - "react/react-in-jsx-scope": "error" + "react/react-in-jsx-scope": "error", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "warn" } } diff --git a/package.json b/package.json index f1f589ac..5f43df9d 100644 --- a/package.json +++ b/package.json @@ -11,12 +11,13 @@ "url": "https://github.com/feross/eslint-config-standard-react/issues" }, "dependencies": { - "eslint-config-standard-jsx": "^8.0.0" + "eslint-config-standard-jsx": "^8.1.0" }, "devDependencies": { - "eslint": "^6.2.2", - "eslint-plugin-react": "^7.6.1", - "tape": "^4.8.0" + "eslint": "^7.7.0", + "eslint-plugin-react": "^7.20.6", + "eslint-plugin-react-hooks": "^4.1.0", + "tape": "^5.0.1" }, "homepage": "https://github.com/feross/eslint-config-standard-react", "keywords": [ @@ -50,8 +51,8 @@ "license": "MIT", "main": "index.js", "peerDependencies": { - "eslint": ">=6.2.2", - "eslint-plugin-react": ">=7.6.1" + "eslint": ">=7.7.0", + "eslint-plugin-react": ">=7.20.6" }, "repository": { "type": "git", From bc328de8a47881986c5c00489b75d53898a3a85e Mon Sep 17 00:00:00 2001 From: Chris Watson Date: Mon, 31 Aug 2020 09:20:40 -0400 Subject: [PATCH 2/2] set react version latest, add plugin as peerDep --- eslintrc.json | 2 +- package.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/eslintrc.json b/eslintrc.json index 606518d6..5bbae11b 100644 --- a/eslintrc.json +++ b/eslintrc.json @@ -9,7 +9,7 @@ "settings": { "react": { - "version": "detect" + "version": "latest" } }, diff --git a/package.json b/package.json index 5f43df9d..e8eb9b65 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "eslint-config-standard-react", "description": "JavaScript Standard Style React/JSX support - ESLint Shareable Config", - "version": "9.2.0", + "version": "10.0.0", "author": { "name": "Feross Aboukhadijeh", "email": "feross@feross.org", @@ -19,6 +19,10 @@ "eslint-plugin-react-hooks": "^4.1.0", "tape": "^5.0.1" }, + "peerDependencies": { + "eslint": ">=7.7.0", + "eslint-plugin-react": ">=7.20.6" + }, "homepage": "https://github.com/feross/eslint-config-standard-react", "keywords": [ "JavaScript Standard Style", @@ -50,10 +54,6 @@ ], "license": "MIT", "main": "index.js", - "peerDependencies": { - "eslint": ">=7.7.0", - "eslint-plugin-react": ">=7.20.6" - }, "repository": { "type": "git", "url": "git://github.com/feross/eslint-config-standard-react.git"