Skip to content

Rule Proposal: vue/no-restricted-component-names #2182

Closed
@qmhc

Description

@qmhc

Please describe what the rule should do:

Restrict some component names via a list of pattern.

What category should the rule belong to?

[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)

Provide 2-3 code examples that this rule should warn about:

Options:

{
  "vue/no-restricted-component-names": ["error", "Foo", "/^Baz(One|Two)/"]
}
<script>
<!--BAD -->
export default {
  name: 'Foo'
}

<!--BAD -->
export default {
  name: 'BazTwo'
}

<!--GOOD-->
export default {
  name: 'Allow'
}
</script>

Additional context

Related #2180 (comment).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions