diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c06004..dc7202b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 3.8.7 + +### Patch Changes + +- [#377](https://github.com/import-js/eslint-import-resolver-typescript/pull/377) [`a14fdd9`](https://github.com/import-js/eslint-import-resolver-typescript/commit/a14fdd95011c4c09b74f71854410f684c0f04bc5) Thanks [@carlocorradini](https://github.com/carlocorradini)! - fix: include mapper with no files and force non-dynamic projects to use absolute paths + ## 3.8.6 ### Patch Changes diff --git a/package.json b/package.json index 8d601b8..128f7b8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-import-resolver-typescript", - "version": "3.8.6", + "version": "3.8.7", "type": "module", "description": "This plugin adds `TypeScript` support to `eslint-plugin-import`", "repository": "git+https://github.com/import-js/eslint-import-resolver-typescript", diff --git a/src/index.ts b/src/index.ts index c5a8822..46ba89f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -430,7 +430,9 @@ function initMappers(options: InternalResolverOptions) { // Turn glob patterns into paths const projectPaths = [ ...new Set([ - ...configPaths.filter(path => !isDynamicPattern(path)), + ...configPaths + .filter(p => !isDynamicPattern(p)) + .map(p => path.resolve(process.cwd(), p)), ...globSync( configPaths.filter(path => isDynamicPattern(path)), { @@ -504,11 +506,6 @@ function initMappers(options: InternalResolverOptions) { : []), ] - if (files.length === 0) { - // eslint-disable-next-line unicorn/no-useless-undefined - return undefined - } - return { path: toNativePathSeparator(tsconfigResult.path), files: new Set(files.map(toNativePathSeparator)),