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

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?

2

u/fucking_passwords Jun 04 '19

Yes, that is what comma-dangle refers to (that and arrays).

I hear ya, and honestly if you are working on a project by yourself then do whatever you want. But when you start working with a team, consistency is much more important. I don't want to reverse engineer someone else's code every time I jump into a new project.

I agree that airbnb is not perfect, which is why we've adjusted it at my company, to more closely fit everyone's liking. It wasn't the easiest process to all agree on, but it has made an enormous impact on our productivity. Code reviewing a PR is so much easier now, and we can focus on important things like architecture, patterns, paradigms, and naming, rather than on basic issues and arguing about style.