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
?
What your looking for is brace-style
in eslint
.
Link: http://eslint.org/docs/rules/brace-style