4 ms·
I really dislike the formatting with a space between function name and arguments function foo (a, b) { compared to the more common: function foo(a, b
by 11235813213455 8y ago
I really dislike the formatting with a space between function name and arguments
function foo (a, b) {
compared to the more common:
function foo(a, b) {
- pagnol 8y agoFor better or for worse this is part of the "Standard Style": https://www.npmjs.com/package/standard https://www.npmjs.com/package/standard It always seemed like an odd choice to me that would make people less likely to adopt it.
- otras 8y agoImportant emphasis on the quotation marks around the word standard. From the readme: > But this isn't a real web standard! > Of course it's not! The style laid out here is not affiliated with any official web standards groups, which is why this repo is called standard/standard and not ECMA/standard. > The word "standard" has more meanings than just "web standard" :-) I’m not a fan of the naming, but I could also be biased because I disagree with some of the formatting rules.
- wanted2 8y agoUnfortunately in the JS community you cannot say these things without being punished. If you do anything else than strict eslint with "airbnb settings", or default prettier settings, your head goes off! Don't ever say this to your JS team mate. It's a very rigid community if it comes to these futilities.
- Waterluvian 8y agoThis is... puzzling. Where do you see these attitudes? Both ways are perfectly cromulent and it's fine for people to have opinions. In my years of JS dev the main thing I've seen from the community is "pick a style and stick to it. Be consistent." And that's pretty typical and sage advice of all programming. The reason to downvote parent is that it's bringing up a tired debate. We may as well discuss tabs vs. spaces while we're at it.
- wanted2 8y ago> The reason to downvote parent is that it's bringing up a tired debate. Do you mean that even when it is scientifically proved that your code is more readable when using more white space like in: console.log( "Hello world!" ); we are not even allowed to mention that because some random dudes decided we have to adhere to the "airbnb" settings? I bring this up because I think it's pathetic, like many other things in the JS community. Tired debate or not, we should have freedom of thinking and speech please! Programming is also a very creative activity, we should not destroy that with these kind of silly rules that make it more of an administrative activity.
- matthewmacleod 8y agoNo, you’re free to talk about whatever you want. But don’t expect pointless bikeshedding to be well-received. First, it’s not a real problem. The JS community is pretty much equivalent to any other of this matter. Second, it’s not a big issue. Use a code formatter to make sure shared code is in the agreed style for whatever project you are contributing to. Third, this does not affect your own code. You are free and encouraged to use whatever formatting convention works for your own teams. Just make sure it’s consistent and enforced. Keeping consistent style is anything but a “silly rule” and it’s essentially no effort.
- wanted2 8y agoIt is a real problem, I've seen heated discussions in a few companies, and it can take out a big part of the fun you have in your work. We really need to write an editor plugin/solution for this. Your editor should show the code in your preferred style, but saving it in the team's agreed style. And then a local-style.js for your own settings, and a team-style.js for the team settings. local-style.js in the .gitignore. Should be possible though?
- Waterluvian 8y agoYou could absolutely make that. It sounds neat.