Skip to content

--skip=project triggers suppressions/unused for project-rule suppressions #9258

@jakeleventhal

Description

@jakeleventhal

Summary

When running biome check --skip=project, suppressions that target project-domain diagnostics can become suppressions/unused warnings and fail CI with --error-on-warnings.

This seems surprising because skipping a domain is intended to exclude that domain's checks, but it introduces a new warning from another rule.

Biome version

2.4.3

Platform

  • macOS 26.4 (arm64)

Minimal repro

1) Create files

package.json

{
  "name": "biome-repro",
  "private": true
}

biome.jsonc

{
  "linter": {
    "domains": {
      "project": "recommended"
    },
    "rules": {
      "correctness": {
        "noUndeclaredDependencies": "on"
      }
    }
  }
}

index.ts

// biome-ignore lint/correctness/noUndeclaredDependencies: repro for --skip=project interaction
import { foo } from "not-installed-package";

void foo;

2) Run without skipping project domain

bunx biome check index.ts --error-on-warnings

Result: exits 0

3) Run with --skip=project

bunx biome check index.ts --error-on-warnings --skip=project

Result: exits 1 with:

  • suppressions/unused at line 1

Expected behavior

If project diagnostics are skipped, suppressions for project-domain diagnostics should not produce a new suppressions/unused warning (or there should be a way to keep this from failing in this mode).

Actual behavior

--skip=project causes:

  • suppressions/unused warning
  • non-zero exit when --error-on-warnings is enabled

This makes --skip=project difficult to use in existing codebases that have valid suppressions for project rules.

Metadata

Metadata

Assignees

Labels

A-AnalyzerArea: analyzerS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions