pageClass | sidebarDepth | title | description | since |
---|---|---|---|---|
rule-details |
0 |
vue/no-unsupported-features |
disallow unsupported Vue.js syntax on the specified version |
v6.1.0 |
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.
This rule reports unsupported Vue.js syntax on the specified version.
{
"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.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.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
">=2.6.0-beta.1 <=2.6.0-beta.3"
or 2.6 custom build"v-bind-prop-modifier-shorthand"
...v-bind
with.prop
modifier shorthand.
- Vue.js 3.1.0+
<template>
<!-- ✓ GOOD -->
<MyInput v-bind:foo.sync="val" />
<!-- ✗ BAD -->
<!-- argument on `v-model` -->
<MyInput v-model:foo="val" />
<!-- custom modifiers on `v-model` -->
<MyComp v-model.foo.bar="text" />
</template>
<template>
<!-- ✓ GOOD -->
<CustomComponent :foo="val" />
<ListComponent>
<template slot="name" slot-scope="props">
{{ props.title }}
</template>
</ListComponent>
<!-- ✗ BAD -->
<!-- dynamic directive arguments -->
<CustomComponent :[foo]="val" />
<ListComponent>
<!-- v-slot -->
<template v-slot:name="props">
{{ props.title }}
</template>
<template #name="props">
{{ props.title }}
</template>
</ListComponent>
</template>
- 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 - v-bind .prop shorthand proposal
This rule was introduced in eslint-plugin-vue v6.1.0