Enable the brace-style and curly ESLint rules to match the decision described in the issue linked above. Now braces need to be present and the body must be on a new line:
// allowed
if (foo) {
doSomething();
}
// disallowed
if (foo) { doSomething(); }
if (foo) doSomething();
if (foo)
doSomething();
Testing
Manually modified test files within the repo and verified that lint errors are reported for both JS and TS code if you have an if without braces.
Justification
Fixes #86.
Implementation
Enable the brace-style and curly ESLint rules to match the decision described in the issue linked above. Now braces need to be present and the body must be on a new line:
Testing
Manually modified test files within the repo and verified that lint errors are reported for both JS and TS code if you have an
if
without braces.