vue/require-direct-export

require the component to be directly exported

📖 Rule Details

This rule aims to require that the component object be directly exported.

<script> /* ✓ GOOD */ export default { name: 'ComponentA', data() { return { state: 1 } } } </script>
Now loading...
<script> const ComponentA = { name: 'ComponentA', data() { return { state: 1 } } } /* ✗ BAD */ export default ComponentA </script>
Now loading...

🔧 Options

Nothing.

🔍 Implementation

Last Updated: 3/4/2019, 8:34:02 AM