🛠️ESLint
Also known as ES Lint, eslint.config.js, JavaScript Linter
A free tool that checks JavaScript code for slips. It does not run the code.
Think of it like
It is like a teacher who marks your homework. She circles each slip and says what is wrong.
Example
Jack runs ESLint before he pushes. It warns that he made a variable called total and never used it.
Why it matters
It catches small slips before they reach users. Teams also use it to keep everyone's code in one style.
Definition
Example code
console
$ npx eslint app.js
3:7 error 'total' is assigned a value but never used no-unused-varsCommon mistake
Key takeaways
- 1Reads, does not run. It checks the code as text.
- 2Rules you choose. Turn each check on or off in the config.
- 3Fixes some for you. Run it with --fix for the simple ones.