Appearance
vue/prefer-import-from-vue
强制从 'vue' 导入,而不是从 '@vue/*' 导入
- ⚙️ 此规则包含在
"plugin:vue/essential"
、*.configs["flat/essential"]
、"plugin:vue/strongly-recommended"
、*.configs["flat/strongly-recommended"]
、"plugin:vue/recommended"
和*.configs["flat/recommended"]
中。
🔧命令行 上的
--fix
选项可以自动修复此规则报告的一些问题。¥🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 规则详情
此规则旨在使用从 'vue'
导入而不是从 '@vue/*'
导入。
¥This rule aims to use imports from 'vue'
instead of imports from '@vue/*'
.
从以下模块导入几乎总是错误的。你应该从 vue
导入。
¥Imports from the following modules are almost always wrong. You should import from vue
instead.
@vue/runtime-dom
@vue/runtime-core
@vue/reactivity
@vue/shared
🔧选项
¥🔧 Options
无。
¥Nothing.
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v8.5.0 中引入
¥This rule was introduced in eslint-plugin-vue v8.5.0
🔍代码实现
¥🔍 Implementation