Closed
Description
Please describe what the rule should do:
In a prop definition with multiple allowed types, the rule suggests to put Boolean
first to allow shorthand boolean props (see #775, #1781, #1796).
What category should the rule belong to?
[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
export default {
props: {
// PASS
foo: Boolean,
foo: String,
foo: [Boolean],
foo: [Boolean, String],
foo: { type: Boolean },
foo: { type: String },
foo: { type: [Boolean] },
foo: { type: [Boolean, String] },
// FAIL
foo: [String, Boolean],
foo: { type: [String, Boolean] },
},
}