by jokoon · 5y ago · 0 comments
I would still love a "20 mistakes you need to avoid when writing JS".
One of the most horrible "WHAT IS HAPPENING HERE?" moment in JS was when there was a missing semicolon after some multiline code and error messages were not helping at all. I'm wondering if JS compilers will have some linter or will one day help beginners be warned of "possible mistakes".
Isn't there a list of "good practices" or "js coding standards"?
let a = 123
({a}= {a: 10})
Prettier will reformat it like this: let a = 123(({ a } = { a: 10 }));
You could also use ESLint to enforce semicolons.The error messages when running code like this aren't very good though.
I'm not a JS dev but isn't this something almost any IDE with a linter would help you out with?