-
-
Notifications
You must be signed in to change notification settings - Fork 950
linter: @eslint-react/eslint-plugin does not work jsPlugins #14503
Copy link
Copy link
Labels
A-linterArea - LinterArea - Linter
Description
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?
What happened?
When trying out jsPlugins with @eslint-react/eslint-plugin I ran into multiple issues:
At first it fails with
× Failed to load JS plugin: @eslint-react/eslint-plugin
│ Package subpath '.' is not defined by "exports" in .../node_modules/@eslint-react/eslint-plugin/package.json
The conditional exports in the package.json does not seem to be correctly resolved
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
},
},
Patching the exports to
"exports": {
".": "./dist/index.js"
},
fixes the issue.
Then it fails with
× Plugin '@eslint-react' not found
This seem to be because the plugin exposes itself as meta: { name: '@eslint-react/eslint-plugin', version: '2.0.6' }, however the error persists when changing the rule names to @eslint-react/eslint-plugin/<local rule name>.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
Type
Fields
Give feedbackPriority
None yet
Effort
None yet
{ "$schema": "./node_modules/oxlint/configuration_schema.json", "jsPlugins": ["@eslint-react/eslint-plugin"], "categories": { "correctness": "off" }, "rules": { "@eslint-react/jsx-no-comment-textnodes": ["error"], "@eslint-react/dom/no-dangerously-set-innerhtml": ["error"], "@eslint-react/naming-convention/context-name": ["error"] } }