| 37 | } |
| 38 | |
| 39 | function labelToPath(label: string): string { |
| 40 | const trimmed = label.startsWith('//') ? label.slice(2) : label |
| 41 | const colonIdx = trimmed.indexOf(':') |
| 42 | const packageName = colonIdx >= 0 ? trimmed.slice(0, colonIdx) : '' |
| 43 | const targetName = colonIdx >= 0 ? trimmed.slice(colonIdx + 1) : '' |
| 44 | |
| 45 | if (!packageName || targetName !== 'tsconfig_json_unformatted') { |
| 46 | throw new Error(`Unexpected tsconfig rule label: ${label}`) |
| 47 | } |
| 48 | |
| 49 | return join(packageName, 'tsconfig.json') |
| 50 | } |
| 51 | |
| 52 | function parseTsconfigLine( |
| 53 | line: string |