Skip to content

[BUG] oxlint-plugin-convex: imports definePlugin/defineRule from "oxlint" — moved to "@oxlint/plugins" in oxlint 1.45+ #26

@stickerdaniel

Description

@stickerdaniel

The plugin imports definePlugin and defineRule from oxlint (packages/oxlint-plugin-convex/src/index.ts:56), but those exports were removed from the oxlint package entry point and moved to a separate @oxlint/plugins package (oxc-project/oxc#18610, #18828). Loading the plugin fails on oxlint 1.45 and newer:

SyntaxError: The requested module 'oxlint' does not provide an export named 'definePlugin'
    at loadPlugin (.../oxlint/dist/lint.js:17515:17)

(oxlint@1.44.0 was never published to npm, so 1.45.0 is the first user-visible broken release.)

proposed fix:

- import { definePlugin, defineRule } from "oxlint";
+ import { definePlugin, defineRule } from "@oxlint/plugins";
// packages/oxlint-plugin-convex/package.json
+ "dependencies": {
+   "@oxlint/plugins": ">=1.43.0"
+ },
  "peerDependencies": {
-   "oxlint": ">=1.0.0"
+   "oxlint": ">=1.45.0"
  }

@oxlint/plugins was first published at 1.43.0, so >=1.43.0 covers all versions where the new entry point exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions