You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When checking the plugin:vue/essentialrules I can see that no further extends is used. In the prettier config (this repo) I see that it adds eslint:recommendedat the top.
As far as I understand eslint extends, this means that rules defined in eslint:recommended would override any rules defined before it (so e.g. in plugin:vue/essential, which does not matter in this case as there is no overlap).
Now if I were to add our own set of rules, I would ideally put it before the @vue/prettier config as I want to benefit from the eslint-config-prettier defined within it (to disable possible code-style rules). But this would also mean that this set of rules can't contradict eslint:recommended as that one has higher priority (comes later in the array) and would overrule all conflicting custom rules. If I were to put the config after @vue/prettier I would have to make sure to either not include anything that conflicts with the rules in eslint-config-prettier or possibly duplicate this in the "extends" array to come last.
Is there a special reason for including eslint:recommended in this config? Might it be better to remove that and allow vue-cli to generate a config like this:
I approve of it, and meet the same problem.
I config typescript + prettier from vue-cli to build my project. When I want to extend plugin:@typescript-eslint/recommendedplugin:@typescript-eslint/recommended-requiring-type-checkingplugin:@typescript-eslint/eslint-recommended into my eslintrc.js, I can not find a appropriate order to sort them because @vue/prettier extends the eslint:recommended.
Hi everyone
When I generate a project using Vue CLI and select "prettier" during the prompts, I get the following eslint extends config:
When checking the
plugin:vue/essential
rules I can see that no further extends is used. In the prettier config (this repo) I see that it addseslint:recommended
at the top.As far as I understand eslint extends, this means that rules defined in
eslint:recommended
would override any rules defined before it (so e.g. inplugin:vue/essential
, which does not matter in this case as there is no overlap).Now if I were to add our own set of rules, I would ideally put it before the
@vue/prettier
config as I want to benefit from theeslint-config-prettier
defined within it (to disable possible code-style rules). But this would also mean that this set of rules can't contradicteslint:recommended
as that one has higher priority (comes later in the array) and would overrule all conflicting custom rules. If I were to put the config after@vue/prettier
I would have to make sure to either not include anything that conflicts with the rules ineslint-config-prettier
or possibly duplicate this in the "extends" array to come last.So what I would like:
Which would result in
my-custom-rules
to be overruled byeslint:recommended
.What would might be possible:
Duplicating the
eslint-config-prettier
rules.Is there a special reason for including
eslint:recommended
in this config? Might it be better to remove that and allow vue-cli to generate a config like this:Which would be clearer and make it easy to add custom configs.
The text was updated successfully, but these errors were encountered: