Skip to content

linter: Failed to load JS plugin #14478

@skovhus

Description

@skovhus

What version of Oxlint are you using?

1.22.0

What command did you run?

oxlint

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

{
  "jsPlugins": ["./tools/plugin.js"],
  "rules": {
    "my-custom-plugin/no-switch": "error"
  }
}

What happened?

I tried testing out the new JS plugin. I can get it to work on a simple hello world example, but it fails inside our repository to lookup the JS plugin file. One workaround is to specify an absolute path, then it works. 🤔

I'm on Mac OS.

Testing with having the plugin.js folder next to .oxlintrc.json, but also having it in a sub-folder. It always fails with:

Failed to parse configuration file.

  × Failed to load JS plugin: ./tools/plugin.js
  │   Cannot find module './tools/plugin.js'

I'm still trying to reproduce outside our repository...

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions