Open karlhorky opened 3 weeks ago
If automating this based on the TS types in @types/bun
is not possible / feasible / wanted, then one way that I've found to work around this is to use the ignore
option of import-x/no-unresolved
:
eslint.config.js
const configArray = [
rules: {
'import-x/no-unresolved':
- 'error',
+ [
+ 'error',
+ {
+ ignore: ['^bun(:\\w+)?$'],
+ },
+ ],
},
},
];
Importing modules with
bun:
prefix (eg.bun:test
) orbun
itself with@types/bun
installed results in a resolution error withimport-x/no-unresolved
index.test.ts