eslint-plugin-import-x: oxc-resolver has been a breaking change
I’ve just tried to update to latest version of the plugin. oxc-resolver appears incompatible with yarn PnP (at least out of the box).
Switching to the node-modules linker at least allows it to resolve packages, but it then seems to have some trouble importing .css files which previously worked without additional config.
{
settings: {
"import-x/resolver-next": [
importPlugin.createNodeResolver({
extensions: [".ts", ".tsx", ".js"],
conditionNames: ["my-condition", "import"],
extensionAlias: {
".js": [".ts", ".js"],
},
}),
],
"import-x/internal-regex": "^@my-namespace/",
"import-x/external-module-folders": [".yarn"],
"import-x/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
},
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 30 (30 by maintainers)
Commits related to this issue
- fix: use rspack-resolver fork for pnp support close #242 — committed to un-ts/eslint-plugin-import-x by JounQin 2 years ago
- fix: use `rspack-resolver` fork for pnp support (#243) close #242 — committed to mrginglymus/eslint-plugin-import-x by JounQin 2 years ago
Yeah if I figure out how to create a reproduction case. The only thing that may have some influence on the resolution may be that I have
@org:registry=https://npm.org.comin.npmrcin the repo.import("@org/module")works just fine.I tried original
oxc-resolver, it’s not supported w/opnp, but I think it should be supported. cc @BoshenI’ll try to fix it at our own fork temporarily.
Seems upgrading to latest version of this module and typescript-eslint has solved this for me, these errors no longer occur.
4.9.0 has fixed my CI…🤷🏻♂️ will monitor and raise a new issue if it crops up again. Thanks again for the quick turnaround on issues
This plugin was working fine at https://github.com/un-ts/eslint-plugin-import-x/releases/tag/v4.6.1. After the change to rspack-resolver, and notwithstanding the fixes mentioned above, https://github.com/un-ts/eslint-plugin-import-x/releases/tag/v4.8.0 is now failling intermittently (but very frequently) on CI only. Nothing in the debug logs from this plugin or rspack-resolve hint at why.
I’ll raise a new issue if I can make a repro, but as it’s only happening on my CI that’s proving a bit tricky.
@mrginglymus Could you help to test #243?