Skip to content
On this page

vue/prefer-define-options

enforce use of defineOptions instead of default export.

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

📖 Rule Details

This rule aims to enforce use of defineOptions instead of default export in <script setup>.

The defineOptions() macro was officially introduced in Vue 3.3.

Now loading...
Now loading...

🔧 Options

Nothing.

📚 Further Reading

🚀 Version

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

🔍 Implementation