Skip to content

Allow disabling file name checking for multi-word-component-names rule #1779

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ssipos90 opened this issue Jan 25, 2022 · 1 comment
Open

Comments

@ssipos90
Copy link

ssipos90 commented Jan 25, 2022

Hi,

What rule do you want to change?
multi-word-component-names

Does this change cause the rule to produce more or fewer warnings?
Fewer warnings.

How will the change be implemented? (New option, new default behavior, etc.)?
New option for disabling file name checking

What will the rule do after it's changed?
Don't error/warn for single worded file names if the option disables it.

Additional context
This rule enforces a specific file naming convention that's out if it's scope. How files are named and the overall project is structured does not impact the HTML single word rule conflict.

If I have a file in this structure: src/products/Show.vue, this rule forces me to write it src/products/ShowProduct.vue which is redundant; how it's used in .vue components is the only real concern.

<template>
  <show-product ... />
</template>
<script>
import ShowProduct from 'src/products/Show.vue';

return {
  components: {
    ShowProduct
  }
};
</script>

An option to disable it is fine (I'd remove it altogether for file names, it's out of bounds).

@ota-meshi
Copy link
Member

Thank you for posting this issue.
If the user enables that option, we should also uncheck the name property as well. However, I think the rules need to check their names if they are using the components recursively in the template.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants