Skip to content

linter: extends is processed backwards #14925

@wagenet

Description

@wagenet

What version of Oxlint are you using?

1.24.0

What command did you run?

No response

What does your .oxlintrc.json config file look like?

// .oxlintrc.json
{
  "extends": ["./base.json"],
  "overrides": [
    {
      "files": ["scripts/**/*"],
      "rules": {
        "no-console": "off"
      }
    }
  ]
}
// base.json
{
  "overrides": [
    {
      "files": ["**/*.js"],
      "rules": {
        "no-console": "error"
      }
    }
  ]
}

What happened?

I would expect scripts/foo.js to not warn about no-console. However, it does. This is because the overrides from the extends are appended to the main config, meaning they come later and take precedence. This seems backwards of how we want it. The extends should come first and then overrides in that file should come after what ever was in the extends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions