Skip to content

linter: --rules omits vitest equivalents of shared jest/vitest rules #20466

@christopher-buss

Description

@christopher-buss

Summary

When both jest and vitest plugins are enabled, oxlint --rules only lists shared rules under jest, omitting the vitest/* variant entirely. This makes it impossible to programmatically discover the full set of native vitest rule names from CLI output.

Reproduction

oxlint --rules

Rules like no-conditional-expect, no-alias-methods, valid-expect, no-identical-title, etc. only appear as jest/*:

| no-conditional-expect | jest   |
| no-alias-methods      | jest   |
| valid-expect          | jest   |

The corresponding vitest/no-conditional-expect, vitest/no-alias-methods, vitest/valid-expect entries are missing from the output.

Vitest-only rules (no jest equivalent) do appear correctly:

| consistent-each-for   | vitest |
| hoisted-apis-on-top   | vitest |

Impact

We use --rules output to generate a TypeScript union type of all native oxlint rule names (OxlintNativeRuleName). Because shared rules only appear under jest, our generated type is missing ~40 vitest/* entries, which means we can't type-check vitest rule configs against native oxlint support.

Expected behavior

Shared rules should appear once per plugin that implements them:

| no-conditional-expect | jest   |
| no-conditional-expect | vitest |

Or alternatively, a structured output format (JSON) that maps rules to all implementing plugins.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - LinterC-bugCategory - Bug

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions