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.

👎 Examples of incorrect code:

const ComponentA = {
	name: 'ComponentA',
	data() {
		return {
			state: 1
		}
	}
}

export default ComponentA

👍 Examples of correct code:

export default {
	name: 'ComponentA',
	data() {
		return {
			state: 1
		}
	}
}

🔍 Implementation

Last Updated: 1/7/2019, 2:02:47 PM