fix(cli-plugin-eslint): Resolve proper ESLint package #2560
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
@vue/cli-plugin-eslintand it'slintcommand relies strictly on the ESLint package that has been set in itspackage.json.There is however one problem with this - if a user updates the ESLint by him/herself - it won't be reflected by using
vue-cli-service lintas it will resolve theESlintspecified in this plugin's package.json.It might also lead to the following problem: vuejs/eslint-plugin-vue#568
After updating both ESLint and
eslint-plugin-vuethe ESLint no longer resolves the righteslint-plugin-vue.In order to fix this problem I'm resolving the
ESLintpackage usingloadModulefrom shared utils.Although this solves the problem, I still have few things on my mind:
eslintandeslint-plugin-vueto package.json automatically ingenerator.jsand get rid of them as part of this plugin's dependencies?nexttag on npm for beta releases of this plugin? It would however result in an extra work preparing additional releases.What do you think about it? I'm not sure this is the proper way to address this matter so let's discuss.