From aec6c5ced0cbcd96a0d854d5cac386af2401c86e Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Mon, 22 Jul 2019 15:25:49 +0800 Subject: [PATCH] chore!: move eslint-plugin-prettier to peerDependencies BREAKING CHANGE: This commit also moves eslint & prettier to peerDependencies. After this change, users will have to manually install these dependencies into their project root. Previously we listed the plugin as a dependency of this config, and that only works because package managers will hoist the plugin to project root. This trick is not reliable with current eslint implementation. This also resulted in a bug when the package manager failed to correctly hoist the plugin package, see https://github.com/vuejs/vue-cli/issues/4310 More details can be seen at: - https://github.com/eslint/eslint/issues/3458 - https://github.com/eslint/rfcs/pull/5 --- package.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1f211e6..17788e5 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,11 @@ }, "homepage": "https://github.com/vuejs/vue-cli/tree/dev/packages/@vue/eslint-config-prettier#readme", "dependencies": { - "eslint-config-prettier": "^6.0.0", + "eslint-config-prettier": "^6.0.0" + }, + "peerDependencies": { + "eslint": ">= 5.0.0", "eslint-plugin-prettier": "^3.1.0", - "prettier": "^1.18.2" + "prettier": ">= 1.13.0" } }