fix(linter): correct reportUnusedDisableDirectives off behavior, add integration tests, update docstring#2
Merged
wagenet merged 2 commits intounused-disables-flagfrom Feb 27, 2026
Conversation
…egration tests Co-authored-by: wagenet <9835+wagenet@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix problems noted in PR #19799
fix(linter): correct Feb 27, 2026
reportUnusedDisableDirectives off behavior, add integration tests, update docstring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses three issues flagged in the Copilot review of oxc-project#19799.
off/allownot actually disabling unused-directive reportingWithSeverity(Some(Allow))was passing through asSome(Allow), which downstreamreport_unused_directivestreated as "report as warning". The same bug existed for the config-store fallback. Now both paths filterAllow→None.Integration tests for config-file path
The existing test only covered the CLI flag path. Two new snapshot tests added:
test_report_unused_directives_from_config—reportUnusedDisableDirectives: "warn"in.oxlintrc.jsonreports without any CLI flagtest_report_unused_directives_cli_overrides_config— CLI--report-unused-disable-directives-severity=offsuppresses config-level"warn"Docstring mentions only
eslint-disable-lineUpdated to
// oxlint-disable-lineor// eslint-disable-lineto reflect that both prefixes are supported. Propagated to all generated files (config.generated.ts,configuration_schema.json, website snapshots).✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.