diff --git a/eslint.config.js b/eslint.config.js index 890d83b4..ad343136 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -47,9 +47,13 @@ export default [ 'import/resolver': { node: { pathFilter(pkg, path, relativePath) { - const pkgExport = relativePath - ? pkg.exports?.[`./${relativePath}`] - : pkg.exports?.['.']; + let pkgExport; + if (relativePath) { + pkgExport = pkg.exports?.[`./${relativePath}`]; + } + if (!relativePath || (!pkgExport && relativePath === 'index')) { + pkgExport = pkg.exports?.['.'] ?? pkg.exports; + } return pkgExport?.import?.default ?? pkgExport?.import ?? pkgExport?.[0]?.import ?? diff --git a/lib/auth.js b/lib/auth.js index 41f7d0a9..6e6fb3ef 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -1,7 +1,6 @@ import fs from 'node:fs'; import { ClientRequest } from 'node:http'; -// eslint-disable-next-line import/no-unresolved import ghauth from 'ghauth'; import { clearCachedConfig, encryptValue, getMergedConfig, getNcurcPath } from './config.js';