Closed
Description
Please describe what the rule should do:
Enforces empty lines between top-level options of Vue components.
What category should the rule belong to?
- Enforces code style (layout)
- 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:
//✓ GOOD
export default {
name: 'a-button',
data() {
return {
// ...
}
},
computed: {
// …
}
}
// ✗ BAD
export default {
name: 'a-button',
data() {
return {
// ...
}
},
computed: {
// …
}
}
Additional context
- Consistent format makes it easier to read, find, select, and extend.
- The rule can enforce no empty lines between options (swap GOOD and BAD in the example).
- I'm not sure about the term "options" but decided so because of the "Options API" name.
- StackOverflow Question requesting this (5 Upvotes)
- Github Comment requesting this (6 upvotes)