(basePath: string)
| 48 | } |
| 49 | |
| 50 | function hasResolvableTarget(basePath: string): boolean { |
| 51 | const withoutJs = basePath.replace(/\.js$/u, '') |
| 52 | const candidates = [ |
| 53 | withoutJs, |
| 54 | `${withoutJs}.ts`, |
| 55 | `${withoutJs}.tsx`, |
| 56 | `${withoutJs}.js`, |
| 57 | `${withoutJs}.jsx`, |
| 58 | `${withoutJs}.mjs`, |
| 59 | `${withoutJs}.cjs`, |
| 60 | join(withoutJs, 'index.ts'), |
| 61 | join(withoutJs, 'index.tsx'), |
| 62 | join(withoutJs, 'index.js'), |
| 63 | ] |
| 64 | return candidates.some(candidate => existsSync(candidate)) |
| 65 | } |
| 66 | |
| 67 | function collectMissingRelativeImports(): MissingImport[] { |
| 68 | const files: string[] = [] |
no test coverage detected