Optional - Set format on save and any global prettier options
npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-plugin-node eslint-config-node
npx install-peerdeps --dev eslint-config-airbnb
{
"extends": ["airbnb", "prettier", "plugin:node/recommended"],
"plugins": ["prettier"],
"rules": {
"prettier/prettier": "error",
"no-unused-vars": "warn",
"no-console": "off",
"func-names": "off",
"no-process-exit": "off",
"object-shorthand": "off",
"class-methods-use-this": "off"
}
}
- ESLint Rules - https://eslint.org/docs/rules/
- Prettier Options - https://prettier.io/docs/en/options.html
- Airbnb Style Guide - https://github.com/airbnb/javascript
I asked myself as of 2025, and had to dig a little bit through the web.
Here's what I found :
1. Airbnb
Airbnb didn't have updated their config for over 3 years now, which is still using till v8 of esLint.
Therefore, it doesn't work with the latest framework version, which now use EsLint v9.
For these reason, I (and you should to) do not use the proposed version anymore
2. What to use instead?
Nowadays, your framework is coming with is own esLint configs , which may be superseded by some prettier rules.
Sadly, I could find any configs that became the new standard, I will update the answer if I do
3. Why?
My take, EsLint was never ment to be that, but became it because this was the only tool available at that time.
As we, today, have better tools like prettier that could be used together with EsLint.
To now more:
And this is clearly mentioned by the EsLint Team, which say
4. EsLint vs Prettier : In a nutshell
linter
formatted