Skip to content

no-warn-severity

ESLint severity is error or off, never warn.

Runs under: @noctcore/harness lint-meta, not ESLint · Factory: createNoWarnSeverityRule from @noctcore/lint-meta-rules · Category: config · Fails CI by default: yes

Agents iterate by reading CI failures. A warn severity is a silent miss — it neither fails the build nor gets acted on — so a rule that matters must be an error, and a rule that does not should be off. There is no useful middle.

Reads each configured flat-config file (skipping any that do not exist), strips line comments, and reports any line containing a 'warn' / "warn" severity literal. The violation carries the 1-indexed line number.

  • A 'warn' inside a // line comment.
  • The numeric severity 1: only the quoted 'warn' / "warn" literal is matched.
  • A warn a spread preset injects, since no file the project owns spells it. Use eslint-config-no-warn for the resolved config.
  • Config files not listed in configFiles (the defaults are the root flat configs), and listed ones that do not exist.
createNoWarnSeverityRule(options?: NoWarnSeverityOptions): IMetaRule
Option Type Default Meaning
configFiles string[] ['eslint.config.js', 'eslint.config.mjs', 'eslint.config.cjs'] Flat-config files to scan; each is read only if present.
ciCritical boolean true Whether a violation fails CI.

If your project deliberately uses warn as an in-editor nudge that is not meant to gate CI, this rule does not fit — though the recommended pattern is a separate lint layer for gating and off for everything else.