Skip to content

linter: verify rule config schemas #22955

Description

@Sysix

Background

With the stack of #22907, we finally support rule configuration in the oxlint schema file and Typescript declaration.

Problem

Some rules are skipped at the moment (see https://github.com/oxc-project/oxc/blob/66fa45ec9d70c6977b045f7f38e0587cdcda15ea/crates/oxc_linter/src/utils/schemars.rs) because:

Task

  • remove only one rule from NO_VERIFIED_VALID_SCHEMA array
  • run just linter-schema-json && just linter-config-ts
  • Verify that the rule configuration follow atleast:
  • iterate over crates/oxc_linter/src/rules/<plugin_name>/<rule_name>.rs until the config is well formed (the config = X value from declare_oxc_lint! must need the change)
  • update the schema snapshot with cargo insta test -p website_linter --accept

Notice

Please skip the rules which needs schema generator or ts config generator changes
We want to collect all "special" rules first and calculate a plan to fix them alltogether.

Remaining rules

This list is not up to date, look into NO_VERIFIED_VALID_SCHEMA in oxc_linter/src/utils/schemars.rs for an up to date list:

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-linterArea - Lintergood first issueExperience Level - Good for newcomers

    Type

    Fields

    Priority

    None yet

    Effort

    None yet

    Start date

    None yet

    Target date

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions