vue/no-unsupported-features
disallow unsupported Vue.js syntax on the specified version
- 🔧 The
--fix
option on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule reports unsupported Vue.js syntax on the specified version.
🔧 Options
json
{
"vue/no-unsupported-features": ["error", {
"version": "^2.6.0",
"ignores": []
}]
}
version
... Theversion
option accepts the valid version range ofnode-semver
. Set the version of Vue.js you are using. This option is required.ignores
... You can use thisignores
option to ignore the given features. The"ignores"
option accepts an array of the following strings.- Vue.js 3.4.0+
"define-model"
...defineModel()
macro."v-bind-same-name-shorthand"
...v-bind
same-name shorthand.
- Vue.js 3.3.0+
"define-slots"
...defineSlots()
macro."define-options"
...defineOptions()
macro.
- Vue.js 3.2.0+
"v-memo"
... v-memo directive."v-bind-prop-modifier-shorthand"
...v-bind
with.prop
modifier shorthand."v-bind-attr-modifier"
....attr
modifier onv-bind
directive.
- Vue.js 3.1.0+
"is-attribute-with-vue-prefix"
...is
attribute withvue:
prefix
- Vue.js 3.0.0+
"v-model-argument"
... argument onv-model
"v-model-custom-modifiers"
... custom modifiers onv-model
"v-is"
... v-is directive.
- Vue.js 2.7.0+
"style-css-vars-injection"
... SFC CSS variable injection"script-setup"
...<script setup>
- Vue.js 2.6.0+
"dynamic-directive-arguments"
... dynamic directive arguments."v-slot"
... v-slot directive.
- Vue.js 2.5.0+
"slot-scope-attribute"
... slot-scope attributes.
- Vue.js 3.4.0+
{"version": "^2.6.0"}
{"version": "^2.5.0"}
📚 Further Reading
- API - defineOptions()
- API - defineSlots()
- API - v-memo
- API - v-is
- API - v-is (Old)
- Guide - Dynamic Arguments
- API - v-slot
- API (for v2) - slot-scope
- Vue RFCs - 0001-new-slot-syntax
- Vue RFCs - 0002-slot-syntax-shorthand
- Vue RFCs - 0003-dynamic-directive-arguments
- Vue RFCs - 0005-replace-v-bind-sync-with-v-model-argument
- Vue RFCs - 0011-v-model-api-change
- Vue RFCs - 0040-script-setup
- Vue RFCs - 0043-sfc-style-variables
- Vue RFCs - v-bind .prop shorthand proposal
🚀 Version
This rule was introduced in eslint-plugin-vue v6.1.0