Closed 9romise closed 3 months ago
Is there an exports
/ imports
field in its package.json
? Otherwise I need a repro because I can't reproduce the problem after trying your setup here https://github.com/9romise/eslint-import-resolver-oxc/blob/main/src/nomalizeOptions.ts
I create a new branch to repro this. cc https://github.com/9romise/eslint-import-resolver-oxc/tree/repo/%23201
Just download the source and run pnpm i
and pnpm run repo
.
It says it's found? Where's the failing case?
Oh you meant it should resolve to index.ts
.
In actual runtime, index.ts
is imported instead of repo.ts
, but the resolver finds repo.ts
.
If this is by design, feel free to close this issue.
const result = resolver.sync(file, source)
^^^^ this must be the directory, not the file.
Let me make this clearer in the docs.
I made a
eslint-import-resolver
based onoxc-resolver
. Beside the ruleimport-x/no-self-import
, it perfectly replacedeslint-import-resolver-node
in my projects. I found the problem is for importing from '.'For example, there is a folder includes
index.ts
andtest.ts
, when I write this, I gota
correctly fromindex.ts
intest.ts
. Butresolve.sync
got the result like{ path: '**/**/test.ts' }
I'm not sure if it's really an issue and if I've made the issue clear, if not, feel free to close it or mention me.