From d4e2590e6934f70a289d985802d72f96a05144aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Thu, 22 Oct 2020 16:12:55 +0200 Subject: [PATCH] Make eslint-plugin-jest an optional peerDependency (#9670) --- packages/eslint-config-react-app/README.md | 2 +- packages/eslint-config-react-app/package.json | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/eslint-config-react-app/README.md b/packages/eslint-config-react-app/README.md index 7467c3a1d68..5b401b015c7 100644 --- a/packages/eslint-config-react-app/README.md +++ b/packages/eslint-config-react-app/README.md @@ -19,7 +19,7 @@ If you want to use this ESLint configuration in a project not built with Create First, install this package, ESLint and the necessary plugins. ```sh -npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@^4.0.0 @typescript-eslint/parser@^4.0.0 babel-eslint@^10.0.0 eslint@^7.5.0 eslint-plugin-flowtype@^5.2.0 eslint-plugin-import@^2.22.0 eslint-plugin-jest@^24.0.0 eslint-plugin-jsx-a11y@^6.3.1 eslint-plugin-react@^7.20.3 eslint-plugin-react-hooks@^4.0.8 +npm install --save-dev eslint-config-react-app @typescript-eslint/eslint-plugin@^4.0.0 @typescript-eslint/parser@^4.0.0 babel-eslint@^10.0.0 eslint@^7.5.0 eslint-plugin-flowtype@^5.2.0 eslint-plugin-import@^2.22.0 eslint-plugin-jsx-a11y@^6.3.1 eslint-plugin-react@^7.20.3 eslint-plugin-react-hooks@^4.0.8 ``` Then create a file named `.eslintrc.json` with following contents in the root folder of your project: diff --git a/packages/eslint-config-react-app/package.json b/packages/eslint-config-react-app/package.json index f0964ed72de..74135dec60e 100644 --- a/packages/eslint-config-react-app/package.json +++ b/packages/eslint-config-react-app/package.json @@ -28,6 +28,11 @@ "eslint-plugin-react": "^7.20.3", "eslint-plugin-react-hooks": "^4.0.8" }, + "peerDependenciesMeta": { + "eslint-plugin-jest": { + "optional": true + } + }, "dependencies": { "confusing-browser-globals": "^1.0.9" },