Linting
A specific type of basic static analysis that flags stylistic errors, formatting inconsistencies, and suspicious constructs in source code.
What it is
Linting enforces the "grammar" and style of a programming language. Tools like ESLint automatically analyze code to ensure developers aren't missing semicolons, using inconsistent indentation, or utilizing deprecated functions. It keeps codebases highly readable and structurally uniform across large teams.
When you would use it
You use linters to end petty arguments about code formatting in pull requests, automating stylistic consistency so developers can focus on actual logic.
Common operations
- Highlighting trailing spaces or missing brackets dynamically inside an editor.
- Automatically fixing minor code formatting issues upon saving a file.