JS.VUE.REQUIRE.NAME.PROPERTY

Require a name property in Vue components

Rule Details

This rule requires a name property to be set on components.

{'vue/require-name-property': ['error']}

Copy
<script>
/* GOOD */
export default {
  name: 'OurButton'
}
</script>

{'vue/require-name-property': ['error']}

Copy
<script>
/* BAD */
export default {
}
</script>

{'vue/require-name-property': ['error']}

Copy
<script>
/* BAD */
export default {
  notName: 'OurButton'
}
</script>

Options

Nothing.

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/