From 96e48ca8869b90b69ec3c31739eeaa0454e80c7b Mon Sep 17 00:00:00 2001 From: Joshua David Date: Sat, 30 Oct 2021 18:23:24 +1100 Subject: [PATCH] [Fix] add missing optional peer dependencies --- README.md | 2 +- package.json | 5 +++++ utils/CHANGELOG.md | 1 + utils/package.json | 8 ++++++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 935792a3b5..4bb77f2b95 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ rules: You may use the following shortcut or assemble your own config using the granular settings described below. -Make sure you have installed [`@typescript-eslint/parser`] which is used in the following configuration. Unfortunately NPM does not allow to list optional peer dependencies. +Make sure you have installed [`@typescript-eslint/parser`] which is used in the following configuration. ```yaml extends: diff --git a/package.json b/package.json index aebbc30810..043d6d3524 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,11 @@ "typescript": "^2.8.1 || ~3.9.5", "typescript-eslint-parser": "^15 || ^22.0.0" }, + "peerDependenciesMeta": { + "@typescript-eslint/parser": { + "optional": true + } + }, "peerDependencies": { "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" }, diff --git a/utils/CHANGELOG.md b/utils/CHANGELOG.md index bfa7e8036c..f8f8409155 100644 --- a/utils/CHANGELOG.md +++ b/utils/CHANGELOG.md @@ -4,6 +4,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). This change log adheres to standards from [Keep a CHANGELOG](http://keepachangelog.com). ## Unreleased +- add missing optional peer dependencies ([#2283], thanks [@jdanil]) ## v2.7.1 - 2021-10-13 diff --git a/utils/package.json b/utils/package.json index 2c4c53bd47..028eb8396e 100644 --- a/utils/package.json +++ b/utils/package.json @@ -25,6 +25,14 @@ "url": "https://github.com/import-js/eslint-plugin-import/issues" }, "homepage": "https://github.com/import-js/eslint-plugin-import#readme", + "peerDependenciesMeta": { + "@typescript-eslint/parser": { + "optional": true + }, + "eslint-import-resolver-node": { + "optional": true + } + }, "dependencies": { "debug": "^3.2.7", "find-up": "^2.1.0",