Short answer
Linting reports rule violations in source before you rely on the program. A lint error is a broken rule, and it is not always a syntax error that stops the language from running. ESLint can warn without changing the exit code, or error and set it to 1. Prettier reprints formatting and skips bug-finding rules.
Last verified against the sources listed below.
Key takeaways
- Wikipedia credits the name lint to Stephen C. Johnson at Bell Labs in 1978.
- The original lint analyzed C. The name later spread to style and bug checks in other languages.
- ESLint reports patterns in JavaScript. A warning does not change the exit code. An error sets it to 1.
- Prettier reprints the whole program and does not enforce rules such as no-unused-vars.
- ESLint's getting started page requires Node.js 20.19, 22.13, or 24 and newer.
What is linting? It is a rule check on source code that can fail before the program runs, even when the syntax is legal.
Software development includes the compiler or the interpreter. Linting sits beside that step.
JavaScript is where ESLint does this job. The same idea started as a separate C program, and the word stuck.
What does linting mean?
Linting means reporting patterns in the source that a rule set has marked as problems.
ESLint’s getting started page describes the tool as identifying patterns in ECMAScript and JavaScript so the code stays consistent and avoids bugs. Every rule is a plugin. Nothing runs until you extend a shared config or turn rules on.
The three levels are off, warn, and error. Warn does not change the exit code. Error sets it to 1.
That is the linting code meaning in practice. The file can parse. A rule can still fail the check.
A linting error, in ESLint’s terms, is the error level. It is not a synonym for a syntax error that the language refuses to parse.
Where did the name come from?
The name comes from a 1978 Bell Labs program that trapped small defects in C.
Wikipedia says Stephen C. Johnson coined lint that year, borrowing the image of a dryer lint trap. The program left Bell Labs in Unix Version 7 in 1979.
Johnson wanted a second pass so a programmer could think about the algorithm first and use lint afterward for portability and consistency. The article lists checks such as unused variables, unreachable code, and functions that sometimes return a value and sometimes do not.
Compilers later grew many of those checks. The word stayed for tools that still look past what the compiler insists on. Wikipedia names ESLint for JavaScript, Stylelint for CSS, and Pylint for Python among the later tools.
How does a lint error differ from a compile error?
A compile error means the language rejected the program. A lint error means a configured rule failed.
| Check | What it reads | What a failure means | Example from the docs |
|---|---|---|---|
| Parser or compiler | Whether the syntax is legal | The program is not built or not run | A broken token the language cannot parse |
| ESLint rule at error | A pattern you turned on | Exit code 1 | no-unused-vars, no-undef |
| ESLint rule at warn | The same kind of pattern | Exit code unchanged | The same rules set to warn |
| Prettier | The whole program, reprinted | Formatting is replaced, not judged rule by rule | It does not enforce no-unused-vars |
Prettier’s comparison page draws that last line. Formatting rules, such as line length and comma style, are the category Prettier takes over by reprinting the file. Quality rules, such as unused bindings, stay with the linter because they can point at real bugs.
Prettier is not a list of switches. It has no per-rule formatting toggles.
MDN’s switch page shows a related case. If break is missing, JavaScript keeps going into the next case. Wikipedia lists implicit fall-through as one of the checks later lint tools took on.
The language accepts the fall-through. A lint rule can still flag it.
What do you run, and when?
Run the linter on the files you are about to commit, with rules set to error when the team wants a failed check.
ESLint’s page says you need Node.js ^20.19.0, ^22.13.0, or >=24. The quick start is npm init @eslint/config@latest, which writes eslint.config.js. A note on that page says anyone coming from before version 9 should read the migration guide, because the config file changed.
Then npx eslint yourfile.js runs the rules.
A global install is possible and not recommended. Plugins still have to be local. If you use pnpm, the same page says to set auto-install-peers=true and node-linker=hoisted in an .npmrc file so installs look more like npm.
A long-line rule is a formatting concern Prettier would reprint, or a lint rule if you kept it. A character counter can show the length of one line while you decide. It is not a linter.
Which mistakes are easy to make?
Treating every report as a syntax failure, or turning the linter off because warnings feel noisy, both miss the point.
- Leaving every rule at the default off, then assuming the project was checked. ESLint does nothing until a config enables rules.
- Setting bug-finding rules to warn, then ignoring a zero exit code in automation. Promote them to error if they should block.
- Expecting Prettier to catch unused variables. Its own page says it will not.
- Wrapping a style preference and a defect in the same severity, so people learn to skip the whole report.
Use the linter for patterns the language will still run. Use the compiler or the parser for code that is not legal. Use Prettier when the only argument left is how the legal code is printed.
What should a rule set include first?
Start with rules that catch defects, and let the formatter own the spacing.
ESLint’s examples use no-unused-vars and no-undef at warn or error. Those are quality rules on Prettier’s list of things a formatter will not fix. Turn them on before you argue about commas.
Wikipedia notes that later tools also flag implicit fall-through in a switch. MDN shows why that rule exists in JavaScript: without break, the next case runs. A linter can mark that pattern even though the syntax is legal.
Add the rule if the team does not want accidental fall-through. Leave it off only if stacked cases are a style you use on purpose and review by hand.
Frequently asked questions
What is a linting error?
A linting error is a rule set to error level, not automatically a syntax error. ESLint's getting started page says a rule at warn, or 1, does not affect the exit code. A rule at error, or 2, makes the exit code 1. The tool's stated job is to find patterns in JavaScript, including unused variables and undefined names in the examples. The program can still be syntactically valid and fail a lint rule.
What does linting mean in everyday code review?
Linting means running those rules on the source, usually before commit or in a check, so the same mistakes are caught the same way every time. Wikipedia traces the word to a 1978 Bell Labs program that picked stray problems out of C, the way a dryer trap picks up lint. Modern uses of the word include style, unused names, and suspicious control flow. The meaning is the check. It is not a claim that the software has already been executed.
How is a linter different from Prettier?
Prettier's comparison page says linters have formatting rules and code-quality rules. Prettier reprints the entire program, so the formatting category is no longer a set of switches you toggle. It does nothing for quality rules such as unused variables, extra binds, or how a promise rejection is written. The page's split is short: Prettier for formatting, linters for catching bugs. Running both is normal. Replacing ESLint with Prettier drops the bug rules.
Does a lint warning fail the process?
Not by itself, in ESLint's three levels. Off, or 0, disables the rule. Warn does not change the exit code. Error sets the exit code to 1. A continuous-integration script that only fails on a non-zero exit will ignore warnings unless you change the command or promote the rule. That is a configuration choice. The getting started page also says ESLint will not lint until you extend a shared config or turn rules on yourself.
Where did the word lint come from?
Wikipedia says Stephen C. Johnson, at Bell Labs, coined lint in 1978 while working on a C grammar and on moving Unix to a 32-bit machine. The image was a clothes-dryer lint trap: catch the stray fibers, leave the cloth. The program shipped outside Bell Labs in Unix V7 in 1979. Johnson's point, as the article summarizes it, was that a second program could look for portability and consistency after the programmer had focused on the algorithm. Compilers later absorbed many of those checks.
Sources
- Getting Started with ESLint · ESLint, 2026
- Prettier vs. Linters · Prettier, 2026
- Lint (software) · Wikipedia, 2026
- switch · MDN, 2026