The ESLint team's official blog, with release announcements, project funding updates, and postmortems for the JavaScript linter.
HN commenters name ESLint as their favorite JS linting tool, and link its post deprecating formatting rules in favor of Prettier and dprint.
Not books per se, but you are probably interested in frontend specific stuff, as you mentioned Angular and Vue. (Not directly inner workings, but somewhat linked):
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]:…
The weird hostile attitude ESLint has about using global config really bums me out. Not everyone wants to install ESLint in every package.json. I work in more than 30 active repos. I want global eslint to just work for most of them, and specific ESLint to work for a few. This used to work fine, now it doesn't.
https://eslint.org/docs/latest/use/getting-started
> It is also possible to install ESLint globally, rather than locally, using npm install eslint --global. However, this is not recommended, and any plugins or shareable configs that you use must still be installed locally if you install ESLint globally.
Which means that simple stuff like just adding the airbnb or eslint recommended settings can now only be done locally.
More discussion here: https://github.com/eslint/eslint/issues/11914
And here: https://github.com/jsx-eslint/eslint-plugin-react/issues/2339
Not everyone works on giant teams where global settings that aren't part of the project become a nightmare for compatibility. We have a very small team with often just one developer doing most of the work on a project.
> I find it frustrating that the eslint recommended presets don't document why they are recommended.
That’s a good point. While this doesn’t address the root problem, I can share some context here as a former maintainer: browsing the core rules [1], you should see that recommended rules flag cases that are highly likely to be bugs or unnecessary constructs. Recommended rules should have false positives only in exceptional cases and be objective or near-universal consensus opinions.
Plugins, of course, are free to choose their own threshold for their recommended configs.
> Why isn't it in the "recommended" preset of lints?
It will be added to recommended in v9! [2] The rule was written during one of the v8 minor versions, and adding to the recommended config is always a breaking change.
[1]: https://eslint.org/docs/latest/rules/
[2]: https://github.com/eslint/eslint/issues/17596
Thank you. This makes a lot of sense. I need to think it through since 'let' is one of the things about modern JavaScript that I quite like, so I need to decide whether I really want to go back to using 'var' again.
To be honest, I resisted adopting ES6 features for quite a long time because I was concerned about exactly this kind of situation, where a modern feature might not work in an older browser that is still in use. However, in 2022, prompted by ESLint's no-var rule [1], I began using ES6 features in my code [2]. Now I find myself wondering whether my earlier, more conservative approach to JavaScript might have been the better approach.
In any case, thank you very much for following up on this thread. It has given me something to think about.
[1] https://eslint.org/docs/latest/rules/no-var
[2] https://codeberg.org/susam/texme/commit/8e31dbf
This is pretty compelling. Why isn't it in the "recommended" preset of lints?
In general, I find it frustrating that the eslint recommended presets don't document why they are recommended. I disable several of the rules in all my projects because they seem to be arbitrary stylistic choices (e.g. [0], [1], [2]).
[0] https://typescript-eslint.io/rules/no-empty-function/
[1] https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/no-children-prop.md
[2] Specifically checkLoops of https://eslint.org/docs/latest/rules/no-constant-condition
[edit] In looking up no-empty-function, I saw a stack overflow post that provides a compelling alternative of using `() => undefined` instead of `() =>
{}`, which suppresses the error. That should be shown as an example on the eslint page!
> BiomeJS started its life as a fork of the now-defunct Rome project
Looking at the pace of frontend development tooling I cannot help but loose trust and confidence with every step and every new release. Major ecosystem player decides to break all previous compatibility with the vast infrastructure accumulated over the years [1]; the main officially recommended linter released under a major brand goes silently abandoned [2]; etc, etc. I didn't even knew Rome died.
A wise queen once said, "it takes all the running you can do, to keep in the same place" [3]. She meant frontend web development.
[1] https://eslint.org/blog/2023/10/flat-config-rollout-plans/
[2] https://github.com/airbnb/javascript/issues/2961
[3] https://en.wikipedia.org/wiki/Red_Queen%27s_race