what's the equivalent of jscs `disallowKeywordsOnNewLine` in eslint?

190 Views Asked by At

what's the equivalent of jscs's disallowKeywordsOnNewLine in eslint? I can't find it in the docs :(

disallowKeywordsOnNewLine Disallows placing keywords on a new line.

Type: Array

Values: Array of quoted keywords

Example

"disallowKeywordsOnNewLine": ["else"]

Valid

if (x < 0) {
    x++;
} else {
    x--;
}

Invalid

if (x < 0) {
    x++;
}
else {
    x--;
}

Maybe this option is not available in eslint?

1

There are 1 best solutions below

0
On BEST ANSWER

What your looking for is brace-style in eslint. Link: http://eslint.org/docs/rules/brace-style