Configurable rule to enforce consistent empty lines between object properties.
The first parameter can either be 'always'
, to enforce empty lines between properties; or 'never'
, to enforce no empty lines between properties.
The second parameter is an object with only one possible boolean property,
exceptAfterSingleLine
, that let the user add an exception to properties that fit in one line.
With ['always']
, the following codes are valid:
const a = {
...otherObject,
a: 1,
b: 2,
c() {
},
d() {
}
};
With ['always', { exceptAfterSingleLine: true }]
:
const a = {
...otherObject,
a: 1,
b: 2,
c() {
},
d() {
}
};
With ['never']
:
const a = {
...otherObject,
a: 1,
b: 2,
c() {
},
d() {
}
};