Add eslint configuration tab #2008
Merged
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.
Closes #1423
This PR updates the configuration tab for
@vue/cli-plugin-eslint
in vue-ui.Original proposition: vuejs/eslint-plugin-vue#477
It adds a

general
tab with two settings, where users can both setlint on save
and choose one of the pre-defined configs:It add a

rules
tab with a list of all rules and categories:When user selects certain category in
general
tab - lets' saystrongly-recommended
we seterror
asdefault
value for all rules inbase
,essential
andstrongly-recommended
categories.At the very bottom we also have a list of
Uncategorized
rules, that are always off by default.Due to the fact that it's really hard, and currently impossible to generate controls that would allow full configuration regarding actual rules' schemas we allow setting only
error
,warning
andoff
. If the user wants he can customize rules further using.eslintrc
, then if the rule has custom settings, we display its value in dropdown ascustom
- but this option appears only if the rule has been reconfigured.Whenever user changes the configuration in
general
tab, to not introduce confusion we're not resetting any custom settings, that user might've set himself before.cc @chrisvfritz