Skip to content

Files

Latest commit

 

History

History
43 lines (31 loc) · 673 Bytes

no-reserved-props.md

File metadata and controls

43 lines (31 loc) · 673 Bytes

Pattern: Disallowed name in prop

Issue: -

Description

Disallow reserved names to be used in props.

<script>
export default {
  props: {
    /* ✗ BAD */
    ref: String,
    key: String,
    /* ✓ GOOD */
    foo: String,
    bar: String,
  }
}
</script>

Options

{
  "vue/no-reserved-props": ["error", {
    "vueVersion": 3, // or 2
  }]
}
  • vueVersion (2 | 3) ... Specify the version of Vue you are using. Default is 3.

Further Reading