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

33

u/[deleted] May 28 '19

VSCode masterrace but WebStorm is right here. (Modern) JS shouldn't use var when not explicitly needed.

26

u/[deleted] May 28 '19 edited May 28 '19

It's not an IDE that errors anything, it's linters. And VSCode comes with ESLint which gives a warning for var usage with default rules, so idk what you're talking about.

5

u/ingrown_hair May 28 '19

What’s a good lint rule set for beginners? I’ve been writing JS for 6 years. I recently started with the AirBnB set and it’s draining my will to live.

2

u/Myrton May 28 '19

Use https://prettier.io/ and forget about linting

4

u/beforan May 28 '19

As others have said, prettier should not be used to wholesale replace a linter, because it only handles formatting, not code quality, such as recommending let and const.

However I think it's great to replace all the formatting rules in your linter so that it can focus only on code quality while prettier handles the formatting with zero config.

Having to fix formatting yourself to adhere to strict linter rules sucks.

We run prettier on commit.

→ More replies (1)