r/javascript • • May 28 '19

What are some JavaScript things beginners don't know?

333 Upvotes

383 comments sorted by

View all comments

Show parent comments

18

u/fucking_passwords May 28 '19

Gotta shake that attitude, if adjusting how you code makes you really upset, you are setting yourself to have a bad time in this industry.

I use airbnb core, but with a few rules adjusted to my liking. It took a while to get used to, and some of my teammates complained, but you know what, now our PRs all look consistent. I don’t care how much people complain, it’s worth it

1

u/ingrown_hair May 28 '19

I’m trying to avoid monkeying with each rule I don’t like. I’d end up back where I started.

1

u/fucking_passwords May 28 '19 edited May 28 '19

I mean first I’d start with the reason you don’t like it. Is it because it’s unfamiliar? If so, fix that. Or Is it because it’s actually not a super essential rule?

The main rules I tend to disable are things like the strict arrow function rules (they are very very opinionated and are not essential for using arrow functions at all), comma dangle (airbnb requires dangling commas for better git diffing but most people I know hate this rule, it’s not essential), don’t require file extensions for import, etc.

It takes some expertise to fairly judge what is essential and what is too much opinion. If you lack this expertise, there’s an easy fix for that, start learnin! :)

Another thought: I generally start a discussion when we are looking at changing our linting rules so anyone can voice their opinions. I will push back any feedback like “that looks weird”, “I’ve never heard of that so I don’t want it”, because those are not valid arguments for making an informed decision. Everyone is entitled to an opinion, but nobody is entitled to force others to be affected by this opinion, they have to back it up with a convincing argument.

1

u/ingrown_hair Jun 04 '19

I'm all about code formatting and good-practice (e.g. using const). I'm not sure that I need to warned about every console.log in my code. It's distracting to work flow and AirBnB marks a lot of things as erros that could be warnings.

Is 'comma dangling' the requirement for a comma to be after the last element in a static object?

→ More replies (1)