(basePath: string)
| 120 | } |
| 121 | |
| 122 | export function detectConfigFile(basePath: string): { |
| 123 | format: "json" | "jsonc" | "none"; |
| 124 | path: string; |
| 125 | } { |
| 126 | const jsoncPath = `${basePath}.jsonc`; |
| 127 | const jsonPath = `${basePath}.json`; |
| 128 | |
| 129 | if (existsSync(jsoncPath)) { |
| 130 | return { format: "jsonc", path: jsoncPath }; |
| 131 | } |
| 132 | |
| 133 | if (existsSync(jsonPath)) { |
| 134 | return { format: "json", path: jsonPath }; |
| 135 | } |
| 136 | |
| 137 | return { format: "none", path: jsoncPath }; |
| 138 | } |
no outgoing calls
no test coverage detected