ESLint logo

ESLint

Open Source

Pluggable static analysis for JavaScript and TypeScript — catches bugs and enforces style.

Visit websiteGitHub

Pricing

Free / Open source

Type

Automation

Languages

JavaScript, TypeScript

// VERDICT

Reach for ESLint when you want to enforce code-quality and catch bugs in JS/TS across editor and CI, with rules tuned to your team. Skip it when you're outside JS/TS, only need formatting (Prettier), or want deep multi-language static analysis (SonarQube).

Best for

The standard pluggable linter for JavaScript/TypeScript - catching bugs, enforcing style and code-quality rules in the editor and CI, with a huge rule/plugin ecosystem (incl. jsx-a11y).

Avoid when

You're not in the JS/TS ecosystem, you only want formatting (Prettier), or you want a zero-config all-in-one.

CI/CD fit

npm script + flat config · pre-commit (with lint-staged) · GitHub Actions · CI lint gate

Languages

JavaScript · TypeScript

Team fit

JS/TS teams · QA/SDETs keeping test code clean · Teams enforcing code standards

Setup

Easy

Maintenance

Low

Learning

Beginner

Licence

Free / Open source

// BEST FOR

  • Catching bugs and anti-patterns in JS/TS
  • Enforcing consistent code-quality rules
  • A huge rule and plugin ecosystem (incl. jsx-a11y)
  • Running in the editor and as a CI gate
  • Auto-fixing many issues
  • Keeping test/automation code maintainable

// AVOID WHEN

  • You're outside the JS/TS ecosystem
  • You only want code formatting (Prettier)
  • A zero-config all-in-one is preferred
  • Deep multi-language static analysis is the need (SonarQube)
  • You don't want to maintain a rule config
  • Formatting and linting must be one tool

// QUICK START

npm install -D eslint && npx eslint --init
npx eslint .          # run in CI; pair with lint-staged for pre-commit

// ALTERNATIVES TO CONSIDER

ToolChoose it when
PrettierYou want opinionated formatting (run alongside ESLint).
PMDYou need static analysis for JVM/other languages.
SonarQubeYou want a multi-language quality + security platform with gates.

// FEATURES

  • Pluggable rule system with thousands of community rules
  • TypeScript support via typescript-eslint
  • Auto-fix for many rules
  • Severity levels (off, warn, error)
  • Flat config (eslint.config.js) with shareable presets
  • Editor integrations for inline feedback

// PROS

  • Ubiquitous in the JS/TS world
  • Massive plugin ecosystem (React, Vue, Node, Jest, etc.)
  • Auto-fix saves real time on style cleanup

// CONS

  • Configuration sprawl on large monorepos
  • Performance can be slow on huge codebases
  • Migration to flat config requires rewrites

// EXAMPLE QA WORKFLOW

  1. Install ESLint and create a flat config

  2. Choose a base ruleset and plugins

  3. Run in the editor for live feedback

  4. Run pre-commit via lint-staged

  5. Add an eslint CI gate

  6. Tune rules to keep signal high

// RELATED QA.CODES RESOURCES