Repository navigation
Why is vue/multi-word-component-names rule disabled also for components?
#451
Unanswered
stefanobartoletti
asked this question in
Q&A
Replies: 2 comments
|
I guess the main reason behind this decision is that by default Nuxt auto-import components based on path:
So, in default configuration is completely valid to have single-word components as Nuxt would translate it to multi-word during import. |
0 replies
|
@mkubenka Yes, it looks like the rule is allowing single-name component only in subdirs of Only components directly inside |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I noticed that this configuration sets the
vue/multi-word-component-namestooff, and it affects the following patterns (basically everything):I know that
app.vue,error.vue, layouts and pages are supposed to be single-word for good reasons, so it makes sense to disable this rule in these cases, but why is this turned off also for generic components in thecomponentsdirectory?According to the Vue style guide, components are supposed to be multi-word, to prevent possible conflicts, is there a reason why Nuxt is setting a different standard?
Please note that I'm not asking to change this rule, or to give a different preset, I am already overriding this in my projects' configs.
I'm only asking for the sake of knowledge, what is the rationale behind this choice, because maybe I'm getting this wrong and I could remove the more strict rule that I'm using myself if there is a good reason for this.
Thanks!
All reactions