ESLint Rule Categories Reference

ESLint rule categories — possible-errors, best-practices, ES6 — with rule counts.

Searchable ESLint core rule reference organized by category — Possible Problems, Suggestions, Layout & Formatting — with the auto-fixable flag and whether each rule is in the recommended preset.

What are the main ESLint rule categories?

Since ESLint 8 the core rules are grouped into three types: Possible Problems, which catch likely bugs; Suggestions, which improve code without flagging clear errors; and Layout & Formatting, which concern whitespace and style. Older docs used Possible Errors, Best Practices, Variables, Stylistic and ES6.

ESLint rules grouped by category

ESLint ships dozens of built-in core rules. Since ESLint 8 they are organized into three categories by intent, and each rule carries two important flags: whether eslint --fix can auto-correct it, and whether the eslint:recommended preset enables it. This searchable reference lists representative core rules per category so you can find what a rule does and how to wire it up.

How it works

A rule is enabled in your config by name with a severity:

// eslint.config.js (flat config)
export default [
  {
    rules: {
      "no-unused-vars": "error",
      "eqeqeq": ["error", "always"],
      "prefer-const": "warn"
    }
  }
];

Rules in the Possible Problems category catch likely bugs (no-undef, no-unreachable). Suggestions rules nudge toward better patterns (prefer-const, eqeqeq). Layout & Formatting rules govern whitespace and are mostly fixable but now deprecated in favour of Prettier or @stylistic.

Tips and notes

  • Start from eslint:recommended, then add rules as your team agrees on them.
  • Prefer --fix for the fixable Suggestion and Layout rules to save manual work.
  • Move pure formatting to Prettier; keep ESLint focused on correctness.
  • A rule’s severity can be off, warn or error; only error fails CI.