Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upEnable code folding in most IDEs/Editors by placing else { on a newline. #1143
Comments
This comment has been minimized.
This comment has been minimized.
|
Works in VS Code, which editor are you using? Having Either way, changing this would make 100% of all current code using Standard fail so the chances of us changing this are super slim. In every major version of Standard we take great care to only introduce rules that breaks a small percent of the current code, otherwise the burden of keeping up with new Standard releases would be too high. Also, on a very personal note, I really don't like the proposed style at all I'll leave this open for some of the other maintainers to weigh in, but I'm afraid I don't see this happening... |
This comment has been minimized.
This comment has been minimized.
stale
bot
commented
Aug 29, 2018
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |

nyteshade commentedMay 31, 2018
What version of standard?
11.0.1
What operating system, Node.js, and npm version?
Node.js (v8.11.2), npm (6.1.0)
What did you expect to happen?
Given
What actually happened?
We get
The reason behind requesting this is that in many IDEs and editors, code folding is allowed. Fundamentally I am not really at odds with the way standardjs formats things like
} else {other than that it prevents nearly every editor and IDE out there from successfully folding theifand not theelse.If
else {starts on its own line, this problem goes away. For my team, given how we document our code, this is crucial and should be allowed. It is one of the only reasons, we are not currently able to use standardjs to solve our needs.