-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Problem
Starting with oxlint@1.45.0, the ./plugins subpath export was removed from the oxlint npm package. The plugin authoring APIs (definePlugin, defineRule, eslintCompatPlugin) have been moved to a new standalone package: @oxlint/plugins.
This causes oxlint-plugin-complexity to fail when used with oxlint >= 1.45.0:
Failed to load JS plugin: oxlint-plugin-complexity
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './plugins' is not defined by "exports" in oxlint/package.json
Root Cause
The compiled source (dist/index.js) imports from oxlint/plugins:
import { definePlugin } from 'oxlint/plugins';This subpath no longer exists in oxlint >= 1.45.0.
Suggested Fix
Update the import to use the new standalone package:
import { definePlugin } from '@oxlint/plugins';And add @oxlint/plugins as a peer dependency (or dependency).
Workaround
Pinning oxlint to 1.43.0 (the last version with the ./plugins export) works in the meantime.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels