(basePath: string)
| 25 | } |
| 26 | |
| 27 | function hasResolvableTarget(basePath: string): boolean { |
| 28 | const withoutJs = basePath.replace(/\.js$/u, '') |
| 29 | const candidates = [ |
| 30 | withoutJs, |
| 31 | `${withoutJs}.ts`, |
| 32 | `${withoutJs}.tsx`, |
| 33 | `${withoutJs}.js`, |
| 34 | `${withoutJs}.jsx`, |
| 35 | `${withoutJs}.mjs`, |
| 36 | `${withoutJs}.cjs`, |
| 37 | join(withoutJs, 'index.ts'), |
| 38 | join(withoutJs, 'index.tsx'), |
| 39 | join(withoutJs, 'index.js'), |
| 40 | ] |
| 41 | return candidates.some(candidate => existsSync(candidate)) |
| 42 | } |
| 43 | |
| 44 | function collectMissingRelativeImports(): MissingImport[] { |
| 45 | const files: string[] = [] |
no test coverage detected