Skip to content

linter: Error occurs when checking type in jsplugin definition function #14745

@mo36924

Description

@mo36924

What version of Oxlint are you using?

1.23.0

What command did you run?

npx tsc

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

{}

What happened?

Error occurs when checking type in jsplugin definition function.

Comment out the line below added in version 1.21.0 and the type check error will disappear.

[key: string]: (node: ESTree.Node) => void;

plugin.ts

import { defineRule } from "oxlint";

defineRule({
  createOnce(context) {
    return {
      Program(node) {},
    };
  },
});

package.json

{
  "devDependencies": {
    "oxlint": "1.23.0",
    "typescript": "5.9.3"
  }
}

tsconfig.json

{
  "compilerOptions": {
    "target": "esnext",
    "module": "esnext",
    "moduleResolution": "bundler",
    "strict": true,
    "skipLibCheck": true
  }
}

Metadata

Metadata

Assignees

Labels

Type

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions