felixge / felixge/node-style-guide
else/else if on newline
Open
- Dominant language
- JavaScript
- Stars
- 5k
- Forks
- 893
- PR merge metrics
- No merged PRs in 30d
Description
I prefer to move logic constructions in separated lines:
```javascript
if (a) {
// ...
}
else if (a != b) {
// ...
}
else {
// ...
}
```
This makes code more git friendly (like trailing commas). And also it makes it simple to comment `else if` and `else` sections. Each block is prepended with it's own condition.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.