Registry / testing / eslint-import-resolver-oxc

eslint-import-resolver-oxc

JSON →
library0.15.0jsnpmunverified

An ESLint import resolver wrapping oxc-resolver for eslint-plugin-import and eslint-plugin-import-x. Current stable version is 0.15.0, with frequent releases (multiple minor/patch versions in 2024). Key differentiators: significantly faster than eslint-import-resolver-node by leveraging the Rust-based oxc-resolver; supports configuration via bundler configs (Vite, Rspack, Webpack) and auto-detection of tsconfig/jsconfig; offers both sync and async resolver-next API. Ships TypeScript types, ESM/CJS compatible, and requires oxc-resolver as a peer dependency. Community alternative to eslint-import-resolver-typescript.

npm install eslint-import-resolver-oxc
INSTALL
IMPORT
SIG · ESLINT-IMPORT-RESO
E
eslint-import-resolver-oxc
testingjavascriptv0.15.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

createOxcImportResolver
✓ import { createOxcImportResolver } from 'eslint-import-resolver-oxc'
✗ import createOxcImportResolver from 'eslint-import-resolver-oxc'
Named export, not default export.
transformViteConfig
✓ import { transformViteConfig } from 'eslint-import-resolver-oxc'
Utility to transform Vite config for resolver options.
transformRspackConfig
✓ import { transformRspackConfig } from 'eslint-import-resolver-oxc'
Utility to transform Rspack config for resolver options (experimental).

Configure eslint-plugin-import-x with oxc resolver using flat config (ESM).

// eslint.config.js import { createOxcImportResolver } from 'eslint-import-resolver-oxc' export default [ { settings: { 'import-x/resolver-next': [ createOxcImportResolver({ conditionNames: ['node', 'import', 'require'], extensions: ['.js', '.mjs', '.cjs', '.jsx', '.ts', '.mts', '.cts', '.tsx', '.d.ts', '.d.mts', '.d.cts'], }), ], }, }, ]
Debug
Known issues
breakingv0.15.0: oxc-resolver changed from bundled dependency to peer dependency – must install manually.
fix
Run 'npm install oxc-resolver' as an additional dependency.
affects: >=0.15.0
breakingv0.14.0: oxc-resolver updated to ^8.0.0, major version bump may cause incompatibilities.
fix
Ensure oxc-resolver version 8 is installed.
affects: >=0.14.0 <0.15.0
gotchaThe resolver-next API (createOxcImportResolver) is only available for eslint-plugin-import-x >=4.5.0 with flat config.
fix
Use the older resolver API for eslint-plugin-import-x <4.5.0 (settings['import-x/resolver'] = 'oxc').
affects: >=0.0.0
gotchabundlerConfig support for Vite, Rspack, Webpack is experimental and only works with the async createOxcImportResolver function.
fix
Use await createOxcImportResolver({ bundlerConfig: 'vite.config.ts' }) in an async context.
affects: >=0.10.0
Errors
Common errors & fixes
Cannot find module 'oxc-resolver'
oxc-resolver is a peer dependency and not automatically installed.
fix
Install oxc-resolver: npm install oxc-resolver --save-dev
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'eslint-import-resolver-oxc'
Misconfiguration or package not installed.
fix
Ensure package is installed: npm install eslint-import-resolver-oxc --save-dev. If using ESM, check package.json has "type": "module" or use .mjs extension.
Invalid resolver configuration: unsupported resolver type
Using an incorrect key for the resolver in settings.
fix
Use 'import-x/resolver-next' for eslint-plugin-import-x >=4.5.0, or 'import-x/resolver' for older versions.
Upgrade
Version history
0.15.0latest on npm
Audit
Dependencies
oxc-resolverrequiredCore resolver engine, required as peer dependency.
eslint-plugin-importoptionalIntegration target (optional since v4 plugin can also be used).
eslint-plugin-import-xoptionalIntegration target (optional).
Agent activity
4 hits · last 30 days
node
4
Resources
eslint-import-resolver-oxc — npm install eslint-import-resolver-oxc · libregistry