disallowKeywordsOnNewLine

Disallows placing keywords on a new line.

Types: Array

Values:

  • Array specifies quoted keywords which are disallowed from being placed on a new line

Example

"disallowKeywordsOnNewLine": ["else"]
Valid
if (x < 0) {
    x++;
} else {
    x--;
}
if (x < 0)
    x++;
else
    x--;
if (x < 0) {
    x++;
}
// comments
else {
    x--;
}
do {
    x++;
} while(x < 0);
do
    x++;
while(x < 0);
do {
    x++;
}
// comments
while(x < 0);
Invalid
if (x < 0) {
    x++;
}
else {
    x--;
}
Rule source
Test source