fix(linter): do not count type-aware rules, when not enabled#13062
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
04b0e44 to
08ba39e
Compare
CodSpeed Instrumentation Performance ReportMerging #13062 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue where type-aware rules (tsgolint rules) were incorrectly counted in the total rule count when type-aware functionality was disabled. The fix ensures only relevant rules are counted based on the type-aware configuration state.
Key changes:
- Modified
number_of_rulesmethod to accept atype_awareboolean parameter - Added filtering logic to exclude tsgolint rules when type-aware is disabled
- Updated all callers to pass the appropriate type-aware state
Reviewed Changes
Copilot reviewed 46 out of 46 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
crates/oxc_linter/src/lib.rs |
Updated number_of_rules method signature to accept type-aware parameter |
crates/oxc_linter/src/config/config_store.rs |
Implemented filtering logic to exclude tsgolint rules when type-aware is disabled |
apps/oxlint/src/lint.rs |
Updated caller to pass type-aware configuration state |
| Various snapshot files | Updated expected rule counts reflecting the exclusion of type-aware rules |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
camc314
left a comment
There was a problem hiding this comment.
do we have an integration/e2e test for this
Merge activity
|
08ba39e to
df22559
Compare
df22559 to
4b5495f
Compare
4b5495f to
43b1c5a
Compare
@camc314 is this not enough? oxc/crates/oxc_linter/src/config/config_store.rs Lines 1007 to 1064 in f7a5686 |
|
sounds good, thanks |

closes #13037