Skip to content

fix: apply lint categories to type-aware checks - #41

Merged
dannote merged 2 commits into
elixir-volt:volt-0.19from
romankurakin:fix/type-aware-categories
Sep 30, 2026
Merged

dannote merged 2 commits into
elixir-volt:volt-0.19from
romankurakin:fix/type-aware-categories

Conversation

@romankurakin

@romankurakin romankurakin commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Volt removes category filters before invoking the type-aware runner. A configuration such as rules: %{"correctness" => :deny} therefore does not enable typescript/no-floating-promises unless the rule is also listed explicitly.

Pass categories and enabled plugins to OXC after resolving per-file overrides. OXC expands the categories using its native registry. When tsgolint rejects an unsupported rule, explicitly disable it before retrying so category expansion cannot select it again.

This PR depends on the category support proposed in elixir-volt/oxc_ex#7 and a corresponding OXC release.

Closes #40.

@dannote
dannote force-pushed the fix/type-aware-categories branch from 4ac8868 to 601ce9b Compare September 30, 2026 06:28
@dannote
dannote changed the base branch from master to volt-0.19 September 30, 2026 06:28
@dannote

dannote commented Sep 30, 2026

Copy link
Copy Markdown
Member

I rebased this onto volt-0.19 (#42) and retargeted the PR there; your commit keeps you as the author.

The category list moved into OXC: elixir-volt/oxc_ex#7 now exposes OXC.Lint.type_aware_rules/1, and Volt groups each batch by the rules it resolves to. So there's no category list here, and the unsupported-rule retry can go back to deleting the rule. The tests use 0.18's string plugin names and :error severity.

This needs oxc 0.18.1, so CI here will fail until oxc_ex#7 is merged and released. I ran the Volt suite and lint against that branch locally, and both pass.

romankurakin and others added 2 commits September 30, 2026 11:18
Rebased onto Volt 0.19: batches group files by the rules
OXC.Lint.type_aware_rules/1 resolves, without a category list here.

Co-authored-by: Danila Poyarkov <dev@dannote.net>
@dannote
dannote force-pushed the fix/type-aware-categories branch from f7583ff to 16e9361 Compare September 30, 2026 07:19
@romankurakin
romankurakin marked this pull request as ready for review September 30, 2026 07:50
Copilot AI balanced review requested due to automatic review settings September 30, 2026 07:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@romankurakin

Copy link
Copy Markdown
Contributor Author

Thank you for integrating it.

@dannote
dannote merged commit 8f8c314 into elixir-volt:volt-0.19 Sep 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lint categories do not enable type-aware rules

3 participants