0

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?

stevemao
  • 1,423
  • 1
  • 16
  • 29

1 Answers1

1

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

Gyandeep
  • 12,726
  • 4
  • 31
  • 42