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 up"Use standard style" #275
Comments
feross
added
the
help wanted
label
Sep 29, 2015
This comment has been minimized.
This comment has been minimized.
lol |
This comment has been minimized.
This comment has been minimized.
|
How about also getting Node core to adopt standard? I thought about it before, but never felt in a comfortable enough position to suggest it. A possible entry point into Node core could be the readable-stream repo, which contains the streams implementation used in core. |
This comment has been minimized.
This comment has been minimized.
|
ping @calvinmetcalf |
This comment has been minimized.
This comment has been minimized.
calvinmetcalf
commented
Sep 29, 2015
|
naw readable-stream is just a bunch of regexes that pull it out of node core |
This comment has been minimized.
This comment has been minimized.
|
I would love to help out! Could we maybe draft a good pull request text that we can use? |
This comment has been minimized.
This comment has been minimized.
|
First pull request submitted! |
This comment has been minimized.
This comment has been minimized.
|
After discussion on IRC, consensus was that this approach is a little too aggressive. I agree. Was worth sharing the idea for feedback, nonetheless! |
feross
closed this
Oct 12, 2015
This comment has been minimized.
This comment has been minimized.
|
@feross Maybe we could try and find repositories that already have a similar coding style, and make pull requests to them? It would be really cool to run standard on every npm package and count the number of errors, then start from the bottom at that list. |
This comment has been minimized.
This comment has been minimized.
Alhadis
commented
Dec 16, 2015
|
@feross : I staunchly oppose your "standard style", your preference for hideous 2-space soft tabs and your blatant disregard for common sense. Seriously dude, stop trying to fix what isn't broken. Also, you should change the name to "JavaScript Common Style", or something. The word "standard" is charged with special meaning in the web community, as you know. Doesn't matter that the readme explains that the word has more than one definition. Saying "this repo follows the JavaScript Standard Style" makes anything else sound like iconoclasm. 🝤 |
This comment has been minimized.
This comment has been minimized.
|
Just because you have made a repository called "Common Sense Coding" doesn't mean that it's actually common sense. If you prefer tabs, then by all means, use them. Two spaces seems to be the most widely used in the JavaScript community though, a standard style needs to take that into account in order to get adoption. |
This comment has been minimized.
This comment has been minimized.
|
@Alhadis No one's forcing anyone to use standard. If it's not your cup of tea, feel free to not use it. Cheers! |
feross commentedSep 29, 2015
•
edited by LinusU
standardhas seen pretty incredible adoption! 1700+ packages already depend on it.But how can we bring the benefits of
standardto more packages? What about getting the top 200 packages to adopt it?Developers get better by inspecting how popular packages work and looking at their
package.jsonfiles. Getting more of the top 200 to adoptstandardwould likely have an outsize effect on overall adoption.I see two possible approaches:
standard --formatand/or manual work to transform packages and send PRs. This would probably be most effective for simple, small packages.standard, answer any questions the maintainers might have. This would probably be most effective if the issues are opened by existing contributors, or users who are invested in the package.Points to mention in PRs, issues:
standard, including Google's Karma and npm itself. Full list.Who wants to help?
This is the current top 200 list: