...
Code Block |
---|
/*eslint padding-line-between-statements: [ "error", { blankLine: "always", prev: ["const", "let", "var"], next: "*"}, { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"]} ]*/ function foo() { var a = 0; var b = 0; bar(); } function foo() { let a = 0; const b = 0; bar(); } function foo() { const a = 0; const b = 0; bar(); } |
comma-dangle
currently:
Code Block |
---|
/*"only-multiline" allows (but does not require) trailing commas when the last element or property is
in a different line than the closing ] or } and disallows trailing commas when the last element or property
is on the same line as the closing ] or }*/
"comma-dangle": [
"error",
{
"arrays": "only-multiline",
"objects": "only-multiline",
"imports": "only-multiline",
"exports": "only-multiline",
"functions": "only-multiline"
}
] |
always-multiline
Examples of incorrect code for this rule with the "always-multiline"
option:
...