ESLint Blog
eslint.org · Company blog · on HN since 2014
The ESLint team's official blog, with release announcements, project funding updates, and postmortems for the JavaScript linter.
What HN saysHN commenters name ESLint as their favorite JS linting tool, and link its post deprecating formatting rules in favor of Prettier and dprint.
112HN people shared it
74linked it in comments
54stories submitted
1.1Kstory points
5 months agolast shared
2014people per year2026
Most-shared posts
- 1ESLint – The pluggable linting utility for JavaScript8 people · 55 points · first shared 2014 · 15 comments on HN
- 2Postmortem for Malicious Packages Published on July 12th, 20187 people · 329 points · first shared 2018 · 155 comments on HN
- 3ESLint v3.0.0 released5 people · 8 points · first shared 2016 · discussion on HN
- 4A year of ESLint paying contributors: Review4 people · 6 points · first shared 2020 · 1 comments on HN
- 5Eqeqeq4 people · first shared 2018
- 6Welcoming JSCS to ESlint3 people · 25 points · first shared 2016 · discussion on HN
- 7ESLint v2.0.0 released3 people · 9 points · first shared 2016 · discussion on HN
- 8Funding ESLint's Future3 people · 6 points · first shared 2019 · discussion on HN
- 9ESLint: Deprecation of Formatting Rules3 people · 2 points · first shared 2023 · discussion on HN
- 10ESLint: Flat Config Rollout Plan3 people · 2 points · first shared 2023 · discussion on HN
- 11Rules3 people · first shared 2022
- 12Future of TypeScript on ESLint2 people · 234 points · first shared 2019 · 85 comments on HN
- 13ESLint 7.02 people · 207 points · first shared 2020 · 90 comments on HN
- 14ESLint v9.02 people · 99 points · first shared 2024 · 47 comments on HN
- 15ESLint v5.0.0 released2 people · 5 points · first shared 2018 · discussion on HN
What HN people wrote when they linked it
nfriedly · 2016-08-30
Running "lint" tools on your code can be helpful for catching basic things, http://eslint.org/ is my favorite one for JS, I know ones exist for other languages.
After that, ask for code reviews. If you don't understand why the reviewer is suggesting a change, keep digging until you do.
Also, as partisan said, reading through the code from the other devs will be a huge win. Even if it doesn't follow "best practices", it will show you what's acceptable in your company which is arguably more important right now. And, again, if you come across something you don't understand, ask about it.
Oh, and you need loads of testing to help avoid regressions. Some manual testing is good, but you really want automated tests covering most things.
susam · 2026-03-20
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
hackthemack · 2025-10-07
Yeah. I think if I were to pick one reason, it would be Lua is "minimalist". But, like I wrote, maybe, it too, would have just had lots of stuff added onto it if it had been in the browser. Hard to say.
I love ++, but you know what? I was shocked when a co-worker pointed out that it is frowned upon to use ++ in javascript. It some big companies, their linter settings mark ++ as something that should be changed.
https://eslint.org/docs/latest/rules/no-plusplus
egorfine · 2025-05-07
> 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
spiderspace · 2024-02-20
ESLint deprecated its formatting rules and recommends Prettier and dprint - https://eslint.org/blog/2023/10/deprecating-formatting-rules/
Vinnl · 2024-01-02
Actually, I was surprised to learn last week that the `eqeqeq` rule that disallows `==` is not in ESLint's recommended set: https://eslint.org/docs/latest/rules/
(And I immediately enabled it for our codebase. Generally I like to just rely on the recommended non-stylistic rules, but this is such an easy footgun that everybody on my team already defaulted to adhering to, that I made an exception.)
captbaritone · 2023-11-09
Author of the rule/post here. It's planned to be included in the set of recommend rules in version 9. https://eslint.org/blog/2023/11/whats-coming-in-eslint-9.0.0/
btmills · 2023-11-09
> 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
CGamesPlay · 2023-11-08
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/rul…
[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!
NateEag · 2021-12-20
I'm a fan of using code formatters to define how you lay out code in a file.
Prettier is popular for that job:
https://prettier.io/
For detecting functional/idiomatic/behavioral issues, ESLint is my go-to:
https://eslint.org/
This shows my bias for automation over human enforcement.
realharo · 2020-05-16
I think eslint would flag it as well for what it's worth (https://eslint.org/demo, you have to set it to newer ES version in the Rules configuration at the bottom of the page).
mceachen · 2019-08-08
"Standard" [1] and "Airbnb" [2] seem to capture some amount of sensible guidelines. Adding Prettier [3] gets you something akin to gofmt, and adopting standard eslint rules [4] can help too.
[1] https://standardjs.com/
[2] https://github.com/airbnb/javascript
[3] https://prettier.io/
[4] https://eslint.org/
aizatto · 2017-11-07
Ditto, this is the same thing I did for a 16,000+ line app.
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.
aeharding · 2016-02-22
Also known as yoda conditions [1]. Some linters have options to enforce non-usage as a best practice [2].
[1] https://en.wikipedia.org/wiki/Yoda_conditions
[2] http://eslint.org/docs/rules/yoda
kevan · 2016-01-29
Auto-formatting is great, but it can't handle everything. For example, our ESLint config prevents modification of function params[1]. I don't think a tool could automatically reformat this into compliance without changing the behavior of the code, a human needs to look at the failure and change it.
[1]http://eslint.org/docs/rules/no-param-reassign.html
krisdol · 2015-10-10
Try it! If you learn about why semicolons were recommended for js, it's pretty easy to avoid writing code that would land you in trouble in the semicolon-free world. Most likely you wouldn't be getting in trouble in the first place since most of the examples had me thinking "why would I ever write code like this?". Besides, I think that recommendation maybe came from a time when the ASI was unreliable and linters were not common. My eslint is awesome at keeping me out of trouble.
For good reading, have a look at the linked articles at the bottom here http://eslint.org/docs/rules/semi.html
diff_sky · 2014-12-21
For javascript, eslint (http://eslint.org/) is now what I use. It's more configurable than what has come before it and has good, clear documentation.
suzzer99 · 2024-07-06
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.
leipert · 2017-07-20
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]:…
dns_snek · 2026-06-04
More generally you can use "no-restricted-syntax" rule to forbid almost any type of syntax by matching AST against CSS-like selectors.
https://eslint.org/docs/latest/rules/no-restricted-syntax
https://typescript-eslint.io/play/
jitl · 2026-02-02
the more recent term i’ve heard is “bulk suppression” eg https://eslint.org/blog/2025/04/introducing-bulk-suppressions/
maleldil · 2025-10-31
eslint has this too: https://eslint.org/docs/latest/rules/prefer-const
arbol · 2025-08-31
I can understand why else is sometimes not needed. JS linters will remove unnecessary else statements by default.
https://eslint.org/docs/latest/rules/no-else-return#rule-details
But never using it is crazy.
dairylee · 2025-07-09
What's the advantages over using bulk suppression in eslint (https://eslint.org/blog/2025/04/introducing-bulk-suppressions/) or ignoring revisions in git blame (https://gist.github.com/kateinoigakukun/b0bc920e587851bfffa98b9e279175…
ggorlen · 2024-11-23
> print debugging is problematic since the developer has to be diligent about removing it once it is not longer needed.
Linters make this a non-issue, and most modern development environments support them.
https://eslint.org/docs/latest/rules/no-console
https://docs.astral.sh/ruff/rules/print/
In situations where for whatever reason it's infeasible to use a linter, a basic grep can surface prints in a codebase reliably enough.
throwitaway1123 · 2024-09-03
ESLint and Prettier are the de facto default linter/formatter combo in JS. There are rules you can enable to enforce your preferred style of function [1][2].
[1] https://eslint.org/docs/latest/rules/func-style
[2] https://eslint.org/docs/latest/rules/prefer-arrow-callback
steve_adams_86 · 2024-04-08
Could it be a gradual move towards standardizing on js config files? Perhaps version 9 will only parse js configs, and this is a step towards that.
Edit: Here’s some info about the gradual migration to flat config and deprecation of eslintrc: https://eslint.org/blog/2023/10/flat-config-rollout-plans/
It seems like it’s been well thought out.
joshkel · 2024-04-08
There's a good write-up of the shortcomings that the new config file is trying to address here: https://eslint.org/blog/2022/08/new-config-system-part-2/
E.g., faster and simpler file access from removing tree-walking for multiple `.eslintrc.*`; better defaults in line with modern JavaScript; better compatibility with modules and Node.js's own file loading.
(And I suspect there's an element of "As long as we're having to introduce a breaking change, let's make it explicitly breaking by also changing the filename.")
kinow · 2024-04-08
I migrated a small project few hours ago and their docs covered most of what I needed. The linked post here has a link to https://eslint.org/docs/latest/use/migrate-to-9.0.0, but earlier today I used only this page: https://eslint.org/docs/latest/use/configure/migration-guide
thenbe · 2023-11-27
By default, eslint only lints files with a .js extension[1]. Eslint plugins are what allow eslint to support more languages. A list can be found here[2].
For the record, prettier can also be extended to support more languages[3].
[1] https://eslint.org/docs/latest/use/command-line-interface#--ext
[2] https://github.com/dustinspecker/awesome-eslint#plugins
[3] https://prettier.io/docs/en/plugins#official-plugins