[READ-ONLY] Mirror of https://github.com/sxzz/eslint-plugin-vuekit. Modern ESLint plugin for Vue 3 eslint-plugin-vuekit.sxzz.dev
eslint plugin vue
eslint-plugin-vuekit docs rules require-default-export.md
1.2 kB · 60 lines
Markdown
at main


pageClass: rule-details sidebarDepth: 0 title: vue/require-default-export description: require components to be the default export since: v9.28.0 #

vue/require-default-export #

require components to be the default export

📖 Rule Details #

This rule reports when a Vue component does not have a default export, if the component is not defined as <script setup>.

<!-- ✗ BAD -->
<script>
const foo = 'foo';
</script>
<!-- ✓ GOOD -->
<script>
export default {
  data() {
    return {
      foo: 'foo'
    };
  }
};
</script>

🔧 Options #

Nothing.

🚀 Version #

This rule was introduced in eslint-plugin-vue v9.28.0

🔍 Implementation #