Skip to content

linter: auto enable env when plugin is detected #11256

@Sysix

Description

@Sysix

When having a config file like:

{
  "overrides": [
    {
      "files": ["**.spec.ts"],
      "plugins": ["jest"]
    }
  ]
}

I expect that the linter will auto enable the env.jest setting in .oxlintrc.json (or CLI with --jest-plugin) like:

{
  "overrides": [
    {
      "files": ["**.spec.ts"],
      "plugins": ["jest"],
      "env": {
        "jest": true
      }
    }
  ]
}

The same with vitest but is currently not supported: oxc-project/javascript-globals#19

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions