MCPcopy
hub / github.com/formatjs/formatjs / main

Function main

tools/check_no_internal_imports.ts:42–62  ·  view source on GitHub ↗
(args: Args)

Source from the content-addressed store, hash-verified

40}
41
42function 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
64if (import.meta.filename === process.argv[1]) {
65 main(minimist<Args>(process.argv.slice(2)))

Callers 1

Calls 3

checkPathFunction · 0.85
errorMethod · 0.80
logMethod · 0.80

Tested by

no test coverage detected