Skip to content

Files

Latest commit

 

History

History
41 lines (28 loc) · 782 Bytes

one-component-per-file.md

File metadata and controls

41 lines (28 loc) · 782 Bytes

Pattern: More than one component per file

Issue: -

Description

This rule checks if there is only one component per file.

/* ✗ BAD */

Vue.component('TodoList', {
  // ...
})

Vue.component('TodoItem', {
  // ...
})
<script>
/* ✓ GOOD */
export default {
  name: 'my-component'
}
</script>

Further Reading