vue/padding-lines-in-component-definition
require or disallow padding lines in component definition
- 🔧 The
--fixoption on the command line can automatically fix some of the problems reported by this rule.
📖 Rule Details
This rule requires or disallows blank lines in the component definition. Properly blank lines help developers improve code readability and code style flexibility.
🔧 Options
json
{
"vue/padding-lines-in-component-definition": ["error", {
"betweenOptions": "always" | "never",
"withinOption": {
"props": {
"betweenItems": "always" | "never" | "ignore",
"withinEach": "always" | "never" | "ignore",
} | "always" | "never" | "ignore", // shortcut to set both
"data": {
"betweenItems": "always" | "never" | "ignore",
"withinEach": "always" | "never" | "ignore",
} | "always" | "never" | "ignore" // shortcut to set both
// ... all options
} | "always" | "never" | "ignore",
"groupSingleLineProperties": true | false
}]
}betweenOptions... Setting padding lines between options. defaultalwayswithinOption... Setting padding lines within optionemits... Setting padding between lines betweenemitsanddefineEmits. defaultalwaysprops... Setting padding between lines betweenpropsanddefineProps. defaultalways- ...
groupSingleLineProperties... Setting groupings of multiple consecutive single-line properties (e.g.name,inheritAttrs), defaulttrue
Group single-line properties
With custom options
🚀 Version
This rule was introduced in eslint-plugin-vue v9.9.0