Skip to content
On this page


disallow specific props

  • 💡 Some problems reported by this rule are manually fixable by editor suggestions.

📖 Rule Details

This rule allows you to specify props that you don't want to use in your application.

🔧 Options

This rule takes a list of strings, where each string is a prop name or pattern to be restricted:

  "vue/no-restricted-props": ["error", "value", "/^forbidden/"]
Now loading...
Now loading...

Alternatively, the rule also accepts objects.

  "vue/no-restricted-props": ["error",
      "name": "value",
      "message": "If you intend a prop for v-model, it should be 'modelValue' in Vue 3.",
      "suggest": "modelValue"

The following properties can be specified for the object.

  • name ... Specify the prop name or pattern.
  • message ... Specify an optional custom message.
  • suggest ... Specify an optional name to suggest changes.
Now loading...

🚀 Version

This rule was introduced in eslint-plugin-vue v7.3.0

🔍 Implementation