Skip to content

vue/component-name-in-template-casing ignores should allow wildcards #721

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

Closed
ffxsam opened this issue Dec 11, 2018 · 2 comments
Closed

vue/component-name-in-template-casing ignores should allow wildcards #721

ffxsam opened this issue Dec 11, 2018 · 2 comments

Comments

@ffxsam
Copy link

ffxsam commented Dec 11, 2018

Currently, the vue/component-name-in-template-casing rule has an ignores parameter to allow specific component names to bypass whatever rule the developer has set. It would be even more useful to allow wildcards, so we could avoid applying Pascal case to third party UI libraries, e.g.:

    'vue/component-name-in-template-casing': [
      'error',
      'PascalCase',
      {
        ignores: ['el-*'],
      },
    ],

So when using Element UI's components (e.g. <el-button>), those will no longer be shown as errors if they're not in Pascal case.

@ffxsam
Copy link
Author

ffxsam commented Dec 11, 2018

Additionally, RegEx could work too:

ignores: [/^el-/]

@armano2
Copy link
Contributor

armano2 commented Dec 11, 2018

there is open pr with similar solution #714

@ffxsam ffxsam closed this as completed Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants