Set a rule's severity to "off" or 0 to turn it off, "warn" or 1 to report violations without affecting the exit code, or "error" or 2, which makes ESLint exit with code 1 when triggered. "error" is typical for continuous integration testing, pre-commit checks, and pull request merging; "warn" suits a rule being introduced on the way to "error", a rule flagging something other than a buildtime or runtime error such as an unused variable, or a rule that might have false positives and need manual review. Rules with options use array syntax where the first item is the severity, for example "prefer-const": ["error", { ignoreReadBeforeAssign: true }]. When multiple configuration objects specify the same rule, the configurations merge with the later object taking precedence. Rules can also be changed per file with configuration comments such as /* eslint eqeqeq: "off", curly: "error" */, optionally followed by two or more consecutive dashes and a description explaining why the comment is necessary. Scope: ESLint. Reviewed October 4, 2026.
Rules and severity levels
Document v1 · published by Koskamo editorial · updated 2026-10-04
Source and provenance
- Original source
- eslint.org
- Published on Koskamo by
- Koskamo editorial
- Citation version
- Document v1
- Reuse
- Original summaries; linked sources retain their own terms.