(args: Args)
| 40 | } |
| 41 | |
| 42 | function main(args: Args): void { |
| 43 | const paths: string[] = args._ |
| 44 | if (paths.length === 0) { |
| 45 | console.error('FAIL: No files or directories provided to check') |
| 46 | process.exit(1) |
| 47 | } |
| 48 | |
| 49 | const errors: string[] = [] |
| 50 | for (const p of paths) { |
| 51 | errors.push(...checkPath(p)) |
| 52 | } |
| 53 | |
| 54 | if (errors.length > 0) { |
| 55 | for (const err of errors) { |
| 56 | console.error(`FAIL: internal import '#packages/' found in ${err}`) |
| 57 | } |
| 58 | process.exit(1) |
| 59 | } |
| 60 | |
| 61 | console.log('PASS: no internal imports found') |
| 62 | } |
| 63 | |
| 64 | if (import.meta.filename === process.argv[1]) { |
| 65 | main(minimist<Args>(process.argv.slice(2))) |
no test coverage detected