Appearance
vue/prefer-define-options
强制使用
defineOptions
而不是默认导出
- 🔧 command line 上的
--fix
选项可以自动修复此规则报告的一些问题。
📖 规则详情
此规则旨在强制使用 defineOptions
而不是 <script setup>
中的默认导出。
¥This rule aims to enforce use of defineOptions
instead of default export in <script setup>
.
defineOptions()
宏在 Vue 3.3 中正式引入。
¥The defineOptions()
macro was officially introduced in Vue 3.3.
Now loading...
Now loading...
🔧选项
¥🔧 Options
无。
¥Nothing.
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v9.13.0 中引入
¥This rule was introduced in eslint-plugin-vue v9.13.0
🔍代码实现
¥🔍 Implementation