Set Up Prettier and ESLint — and Look Like a Pro!
You know what great teams have in common?
No, not swag.
Consistent code style.
The ideal style isn’t your personal favorite.
It’s the one that’s enforced and followed — no drama in PRs.
Prettier is like autopilot for formatting code.
npx prettier --write .
📖 Docs: prettier.io
ESLint is like a strict mentor for your code:
==
instead of ===
,await
,📖 Docs: eslint.org
npm install --save-dev prettier eslint
npx eslint --init
Then in your package.json
:
"scripts": {
"lint": "eslint .",
"format": "prettier --write ."
}
And don’t forget .prettierrc
and .eslintrc
— where the magic lives.
Stop arguing about code style in PRs.
Let the bots decide.
You focus on architecture and business logic.
Setting up Prettier and ESLint is like adding a toxicity filter to your repo.
📌 Do it once — and never argue about spacing again.
📚 Useful links:
🚀 Set up your linters. Be the pro your repo deserves.