JS.VUE.NO.RESERVED.PROPS

Reserved name used in props

Rule Details

This rule disallow reserved names to be used in props.

{'vue/no-reserved-props': ['error']}

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

Options

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

The content on this page is adapted from the ESLint User Guide. Copyright © OpenJS Foundation and other contributors, www.openjsf.org. All rights reserved. https://eslint.org/docs/rules/