Skip to content

Latest commit

 

History

History
135 lines (110 loc) · 5.51 KB

no-unsupported-features.md

File metadata and controls

135 lines (110 loc) · 5.51 KB
pageClass sidebarDepth title description since
rule-details
0
vue/no-unsupported-features
disallow unsupported Vue.js syntax on the specified version
v6.1.0

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

{
  "vue/no-unsupported-features": ["error", {
    "version": "^2.6.0",
    "ignores": []
  }]
}

{"version": "^2.6.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>

{"version": "^2.5.0"}

<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>

📚 Further Reading

🚀 Version

This rule was introduced in eslint-plugin-vue v6.1.0

🔍 Implementation