pageClass | sidebarDepth | title | description |
---|---|---|---|
rule-details |
0 |
vue/require-direct-export |
require the component to be directly exported |
require the component to be directly exported
This rule aims to require that the component object be directly exported.
<script>
/* ✓ GOOD */
export default {
name: 'ComponentA',
data() {
return {
state: 1
}
}
}
</script>
<script>
const ComponentA = {
name: 'ComponentA',
data() {
return {
state: 1
}
}
}
/* ✗ BAD */
export default ComponentA
</script>
Nothing.