Booleancomes first in component prop types
- 💡 Some problems reported by this rule are manually fixable by editor suggestions.
📖 Rule Details
When declaring types of a property in component, we can use array style to accept multiple types.
When using components in template, we can use shorthand-style property if its value is
However, if a property allows
String and we use it with shorthand form in somewhere else, different types order can introduce different behaviors: If
Boolean comes first, it will be
String comes first, it will be
"" (empty string).
See this demo.
👫 Related Rules
This rule was introduced in eslint-plugin-vue v8.6.0