Skip to content

Files

Latest commit

 

History

History
32 lines (23 loc) · 1023 Bytes

match-component-import-name.md

File metadata and controls

32 lines (23 loc) · 1023 Bytes

Pattern: Unmatched component import name

Issue: -

Description

By default, this rule will validate that the imported name matches the name of the components object property identifier. Note that "matches" means that the imported name matches either the PascalCase or kebab-case version of the components object property identifier. If you would like to enforce that it must match only one of PascalCase or kebab-case, use this rule in conjunction with the rule vue/component-definition-name-casing.

<script>
export default {
  components: {
    /* ✓ GOOD */
    AppButton,
    AppButton: AppButton,
    'app-button': AppButton,

    /* ✗ BAD */
    SomeOtherName: AppButton,
    'some-other-name': AppButton
  }
}
</script>

Further Reading