3 ms·
Fwiw, we use 120 columns for Riot/Matrix stuff (https://github.com/matrix-org/matrix-react-sdk/blob/develop/code_style.md https://github.com/matrix-org/matrix-r
by Arathorn 6y ago
Fwiw, we use 120 columns for Riot/Matrix stuff (https://github.com/matrix-org/matrix-react-sdk/blob/develop/code_style.md https://github.com/matrix-org/matrix-react-sdk/blob/develop/...) - 80 is incredibly constraining for JS and JSX. The key metric is to ensure that a typical laptop can show two screens side by side, without any ugly line-wrapping. Also, any wider and you either end up having to scan a wide distance left to right (the same reasons that newspapers use columns to be more legible) - and it also helps discourage lots of nesting and cyclomatic complexity.
- JohnL4 6y agoInteresting. I, too, use 120. It makes diffing code easier.
- delaaxe 6y agoI've found 120 to be the sweet spot - it either fills a laptop screen entirely or allows 2 open editors on a wide screen.
- whycombagator 6y agoNice 120 is also what I've settled on & am used to. But I'd be equally OK, and adjust fine, with anything from 100-120.
- JMTQp8lwXL 6y ago80 works fine for JSX if you have linter rules that put each prop on its own line, for when you have >80 characters of content.