Skip to content

component-name-in-template-casing options.globals should support regex #2912

@kyleshevlin

Description

@kyleshevlin

What rule do you want to change?

I want the vue/component-name-in-template-casing to support regexes for its options.globals option the way it does for its ignores options.

In my use case, we have prepended every component in our design system with c- and globally registered these components. Rather than producing and keeping a list of all those components in sync as they are developed, I'd like to use the regex /^c-/ and capture them.

Does this change cause the rule to produce more or fewer warnings? Neither. Should make it simpler to create the same warnings.

How will the change be implemented? (New option, new default behavior, etc.)?

I imagine by also mapping with the toRegex... helper function used on the ignores option

Please provide some example code that this change will affect:

What does the rule currently do for this code?

It requires you enumerate every single global component name you want to include in the linting.

What will the rule do after it's changed?

A regex could potentially cover many globally registered component names if they follow a namespacing pattern.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions