Skip to content
On this page


disallow boolean defaults

  • 🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

The rule prevents Boolean props from having a default value.

📖 Rule Details

The rule is to enforce the HTML standard of always defaulting boolean attributes to false.

Now loading...

🔧 Options

  • 'no-default' (default) allows a prop definition object, but enforces that the default property not be defined.
  • 'default-false' enforces that the default can be set but must be set to false.
"vue/no-boolean-default": ["error", "no-default|default-false"]

🚀 Version

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

🔍 Implementation