Skip to content

fix(linter): skip suppression validation with --type-check-only#24462

Merged
camc314 merged 2 commits into
oxc-project:mainfrom
hyoban:0713-type-check-suppressions
Jul 13, 2026
Merged

fix(linter): skip suppression validation with --type-check-only#24462
camc314 merged 2 commits into
oxc-project:mainfrom
hyoban:0713-type-check-suppressions

Conversation

@hyoban

@hyoban hyoban commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • skip bulk suppression finalization in --type-check-only mode
  • reject --suppress-all and --prune-suppressions when combined with --type-check-only
  • add a CLI regression fixture for a still-valid regular lint suppression

Root cause

--type-check-only intentionally skips regular lint rules, but bulk suppression finalization still compared the full baseline against the partial runtime rule map. A file processed by type checking was marked as seen without regular rule counts, so valid regular suppressions were interpreted as stale.

Suppression update operations are also unsafe with this partial result because they could remove or replace entries for rules that did not run.

Validation

  • just ready with Node.js 24.14.0
  • verified the original Dify single-file reproduction with both regular lint and --type-check-only

AI usage

I used OpenAI Codex to help investigate, implement, test, and prepare this pull request. I reviewed the changes and take responsibility for the submission.

Fixes #24460

`--type-check-only` skips regular lint rules, leaving an incomplete runtime suppression map. Avoid treating missing rules as stale, and reject suppression update flags that cannot safely operate on partial results.

Refs oxc-project#24460
@hyoban hyoban marked this pull request as ready for review July 13, 2026 12:05
@hyoban hyoban requested a review from camc314 as a code owner July 13, 2026 12:05

@camc314 camc314 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please note that bulk supressions are not yet formally released

@camc314 camc314 added the A-linter Area - Linter label Jul 13, 2026
@camc314 camc314 merged commit df67932 into oxc-project:main Jul 13, 2026
28 checks passed
@camc314 camc314 self-assigned this Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linter: --type-check-only reports regular suppressions as unused

2 participants