JavaScript

JavaScript

Made by DeepSource

Require a name property in Vue components JS-0720

Anti-pattern
Minor
vue

Name property in a SFC module is mostly a convenience for debugging. It's also helpful for recursion.

Bad Practice

<script>
export default {
}

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

</script>

Recommended

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