# ESLint

> A free tool that checks JavaScript code for slips. It does not run the code.

**Field:** Software Development  
**Category:** Editors & Tools  
**Also known as:** ES Lint, eslint.config.js, JavaScript Linter

## Think of it like

It is like a teacher who marks your homework. She circles each slip and says what is wrong.

## Definition

ESLint is a free linter for JavaScript and TypeScript. It reads your code without running it and points out problems. It finds things like a variable you never use, or code that can never run. Each check is a rule, and you turn rules on or off in a file called eslint.config.js. Many problems it can fix by itself.

## Example

Jack runs ESLint before he pushes. It warns that he made a variable called total and never used it.

## Example code

```console
$ npx eslint app.js
  3:7  error  'total' is assigned a value but never used  no-unused-vars
```

ESLint names the line, the problem and the rule that found it.

## Why it matters

It catches small slips before they reach users. Teams also use it to keep everyone's code in one style.

## Common mistake

Turning a rule off each time it fires. Read why it fired first, since most warnings point at a real slip.

## Three principles

- **Reads, does not run.** It checks the code as text.
- **Rules you choose.** Turn each check on or off in the config.
- **Fixes some for you.** Run it with --fix for the simple ones.

## Related terms

- [Linter](https://learn.benibix.com/term/development/linter)
- [Code Formatter](https://learn.benibix.com/term/development/formatter)
- [JavaScript](https://learn.benibix.com/term/development/javascript)
- [TypeScript](https://learn.benibix.com/term/development/typescript)
- [Editor Extension](https://learn.benibix.com/term/development/editor-extension)
- [Prettier](https://learn.benibix.com/term/development/prettier)

## Told apart from

- [Prettier vs ESLint](https://learn.benibix.com/compare/prettier-vs-eslint): People think Prettier and ESLint do the same job, and they do not. Prettier only changes how code looks: the spaces, the quotes and the line breaks. ESLint looks for code that may be wrong, like a name you set but never use. Most teams run both. Prettier sets the look, and ESLint hunts for bugs.

## Taught in

- [Linters and Formatters](https://learn.benibix.com/learn/development-tools/linters-and-formatters): Coding Tools, 4/13

![A code editor window. Down the side, a list of installed extensions: a Python extension, an ESLint extension and a theme. In the code, one line has a squiggly underline, and a box beside it says ESLint: 'total' is assigned but never used. A note says extensions add features, and ESLint marks problems while you type.](https://learn.benibix.com/diagrams/dev-editor-tools.svg)

---

Source: https://learn.benibix.com/term/development/eslint
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
