-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tabs to Spaces #558
Comments
You can add a |
This is more like most JS out there and changes how GitHub displays code. See isaacs/github#170 (comment) Refs #558
It's a bit of a WordPress legacy to prefer tabs over spaces. https://make.wordpress.org/core/handbook/best-practices/coding-standards/javascript/#spacing And that's been picked up in this project (everyone came from WordPress after all). https://github.com/Automattic/wp-calypso/blob/master/docs/coding-guidelines/javascript.md#spacing I agree though, seems like the consensus in the javascript community is to prefer two-spaces for indentation instead of tabs. I think it would be a good idea for us to align with that (even if I always did prefer tabs). |
As a previous 4-spacer, 2 really grows you after a bit of time. But yeah, since you're moving over to JS on such a large scale using React and so on, it would be best to align sooner rather than later : ) Aside from that, great work. |
Thanks, @damassi! |
Browsing the code, i'm noticing that you're using tabs instead of spaces, which blows out code viewing unnecessarily into 8 spaces for every tab:
Idiomatic JS is typically 2 soft spaces, which significantly cuts down on read time across a codebase, while also making contributions easier since people can read the code at a glance.
The text was updated successfully, but these errors were encountered: