Appearance
vue/no-unsupported-features
禁止在指定版本上使用不支持的 Vue.js 语法
- 🔧 command line 上的
--fix选项可以自动修复此规则报告的一些问题。
📖 规则详情
此规则报告指定版本上不支持的 Vue.js 语法。
¥This rule reports unsupported Vue.js syntax on the specified version.
🔧选项
¥🔧 Options
json
{
"vue/no-unsupported-features": ["error", {
"version": "^2.6.0",
"ignores": []
}]
}version...version选项接受node-semver的有效版本范围。设置你正在使用的 Vue.js 版本。此选项是必需的。¥
version... Theversionoption accepts the valid version range ofnode-semver. Set the version of Vue.js you are using. This option is required.ignores...你可以使用此ignores选项来忽略给定的功能。"ignores"选项接受以下字符串的数组。¥
ignores... You can use thisignoresoption to ignore the given features. The"ignores"option accepts an array of the following strings.Vue.js 3.4.0+
"define-model"...defineModel()宏。¥
"define-model"...defineModel()macro."v-bind-same-name-shorthand"...v-bind同名简写。¥
"v-bind-same-name-shorthand"...v-bindsame-name shorthand.
Vue.js 3.3.0+
"define-slots"...defineSlots()宏。¥
"define-slots"...defineSlots()macro."define-options"...defineOptions()宏。¥
"define-options"...defineOptions()macro.
Vue.js 3.2.0+
Vue.js 3.1.0+
"is-attribute-with-vue-prefix"...带有vue:前缀的is属性¥
"is-attribute-with-vue-prefix"...isattribute withvue:prefix
Vue.js 3.0.0+
"v-model-argument"...v-model上的参数¥
"v-model-argument"... argument onv-model"v-model-custom-modifiers"...v-model上的自定义修饰符¥
"v-model-custom-modifiers"... custom modifiers onv-model"v-is"...v-is 指令。¥
"v-is"... v-is directive.
Vue.js 2.7.0+
"style-css-vars-injection"...SFC CSS 变量注入¥
"style-css-vars-injection"... SFC CSS variable injection"script-setup"...<script setup>
Vue.js 2.6.0+
"dynamic-directive-arguments"...动态指令参数。¥
"dynamic-directive-arguments"... dynamic directive arguments."v-slot"...v-slot 指令。¥
"v-slot"... v-slot directive.
Vue.js 2.5.0+
"slot-scope-attribute"...slot-scope 属性。¥
"slot-scope-attribute"... slot-scope attributes.
{"version": "^2.6.0"}
{"version": "^2.5.0"}
📚扩展阅读
¥📚 Further Reading
🚀版本
¥🚀 Version
此规则在 eslint-plugin-vue v6.1.0 中引入
¥This rule was introduced in eslint-plugin-vue v6.1.0
🔍代码实现
¥🔍 Implementation