Personally, I stick to opinionated rulesets such as Standard[1], AirBnb[2] and Unicorn[3] since you won’t spend hours tweaking and selecting new rules.
[1] https://standardjs.com/ [2] https://github.com/airbnb/javascript [3] https://prettier.io/ [4] https://eslint.org/
For example: https://github.com/airbnb/javascript
"Modern" js is mostly about syntactic patterns. Airbnb has a nice style guide that incorporates most of them https://github.com/airbnb/javascript
I used eslint ( https://eslint.org ) and prettier ( https://prettier.io ), and using airbnb's JavaScript Style Guide as a reference point ( https://github.com/airbnb/javascript ), I would enable rules one by one. Then slowly rule by rule (commit by commit) I would clean up the code base.
Coding Style: As a quick reference and to learn about some bad patterns (and how to avoid them), I can recommend the airbnb style guide [1]. They also link to eslint rules, which always have a reasoning why a rule is considered, e.g. the no new object rule [2]. A really interesting thing in the code style corner is prettier, which auto-formats source code pretty [3].
References: The Mozilla Developer Reference Manual, e.g. for String.match [4]. It also has explanations for browser APIs. To check if you already can use a certain browser feature, I recommend caniuse [5]
Now, as you also mentioned your an "old Java Programmer". I think it's quite interesting what goes on the JavaScript space and which features are ~~stolen~~ borrowed from which language. Good search queries to understand the language and it's features (especially the new ones) would be
- Javascript Classes vs Prototype
- Javascript Decorators
- Javascript Arrow Functions (Lambda)
- Node.JS Streams
- Reactive Extensions
- Flow vs. TypeScript
Well I hope that some of that info is usable for you, if you have any detail questions, please just comment :)
[1]: https://github.com/airbnb/javascript
[2]: http://eslint.org/docs/rules/no-new-object.html
[3]: https://github.com/prettier/prettier
[4]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
[5]: https://caniuse.com/
That's why I like sticking as close as possible to AirBnB's guide[0], not because it's better than anything else, it's just that most developper seem to agree on it and it's familiar to most dev.
I'm hoping to see similar efforts on project file/folder structure at some point. How often do two node projects created by different engineering teams end up with the same folder/file structure? There's nearly no strong community convention, unlike many other languages/frameworks. Rails, for example, famously touts that any engineer can walk onto another Rails project and have a reasonable suspicion of where to find a particular piece of code.
1: https://github.com/airbnb/javascript 2: https://twitter.com/hshoff/status/784205839347232768
Beyond that, there are no advantages. It's just a decent eslint config that requires you to omit semicolons wherever possible. If that's important to you, use it. If it's not important, or you'd rather not omit semicolons, or if you do want to omit semicolons but you're happy making a one line change to the airbnb preset, then there's nothing to set this apart from more, if you'll pardon the expression, "standard" options. :)
but style-guides should be just that style guides ...not standards
At work I use airbnb's linting configuration as shown here[1], which specifies the usage of single quotes for strings (no explanation for the preference though).
More people need to present their opinions as the best way to do things.
Some useful, widely-cited examples:
http://eloquentjavascript.net/