---
title: "Linting"
description: "Linting is automated analysis of code for errors and style issues. Learn about popular linters, their role in CI/CD and how they differ from a formatter."
url: "https://nodea.io/en/glossary/linting"
lang: "en"
updated: "2026-07-13"
---

# Linting

> Linting is the automated analysis of source code that flags errors, risky constructs and style deviations before the program is ever run.

**Linting** is the process of automatically analyzing source code for potential bugs, risky constructs and deviations from agreed style rules — before the code is ever run. The tool that performs this analysis is called a linter, a name that traces back to the Unix *lint* program for the C language in the 1970s.

## How linting works

A linter is a kind of static analyzer: it reads code without executing it and checks it against a set of rules. It catches problems a compiler or interpreter might overlook — unused variables, possibly uninitialized values, comparisons that could yield an unexpected result, missing statements or unsafe patterns. Beyond finding bugs, a linter enforces a consistent style across a team: naming conventions, indentation, import ordering. Rules are configured in a project file so that every developer works to the same agreements. It is worth distinguishing linting from [debugging](https://nodea.io/en/glossary/debugging) — a linter acts preventively and statically, while debugging examines a running program.

## Practical application

Every popular ecosystem has its linters: ESLint for JavaScript and TypeScript, PHP\_CodeSniffer and PHPStan for PHP, RuboCop for Ruby, Pylint and flake8 for Python. In mature projects linting hooks into several places: live hints in the editor, pre-commit hooks that run before changes are committed to [version control](https://nodea.io/en/glossary/version-control), and the [CI/CD](https://nodea.io/en/glossary/ci-cd) pipeline, where a failed lint blocks deployment.

As a result, style issues and common mistakes are caught automatically and most cheaply — as the code is being written, rather than during testing or in production. Linting also eases [refactoring](https://nodea.io/en/glossary/refactoring) and code review, since reviewers can focus on logic instead of formatting.

### How is linting different from code formatting?

A linter analyzes code for errors and risky patterns and reports problems, whereas a formatter (such as Prettier) automatically normalizes appearance: indentation, quotes, line length. In practice both are used together — the linter guards quality, the formatter guards a consistent style.

## Related

- [Debugging](https://nodea.io/en/glossary/debugging)
- [CI/CD](https://nodea.io/en/glossary/ci-cd)
- [Refactoring](https://nodea.io/en/glossary/refactoring)
- [Unit testing](https://nodea.io/en/glossary/unit-testing)
- [Version control](https://nodea.io/en/glossary/version-control)

---

Languages: [pl](https://nodea.pl/pl/slownik-pojec/linting.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
