Skip to content

Commit

Permalink
chore!: move eslint-plugin-prettier to peerDependencies
Browse files Browse the repository at this point in the history
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 vuejs/vue-cli#4310

More details can be seen at:
- eslint/eslint#3458
- eslint/rfcs#5
  • Loading branch information
sodatea committed Jul 22, 2019
1 parent 0e0712f commit aec6c5c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit aec6c5c

Please sign in to comment.