(filePath: string, overrides?: Record<string, Language>)
| 182 | * to the built-ins. Omitting it is byte-identical to the zero-config behavior. |
| 183 | */ |
| 184 | export function isSourceFile(filePath: string, overrides?: Record<string, Language>): boolean { |
| 185 | if (isPlayRoutesFile(filePath)) return true; // Play `conf/routes` is extensionless |
| 186 | if (isShopifyLiquidJson(filePath)) return true; // Shopify OS 2.0 JSON templates / section groups |
| 187 | if (isErlangAppFile(filePath)) return true; // OTP `.app`/`.app.src` resource files |
| 188 | const dot = filePath.lastIndexOf('.'); |
| 189 | if (dot < 0) return false; |
| 190 | const ext = filePath.slice(dot).toLowerCase(); |
| 191 | return ext in EXTENSION_MAP || (!!overrides && ext in overrides); |
| 192 | } |
| 193 | |
| 194 | /** |
| 195 | * Shopify OS 2.0 JSON template (`templates/*.json`) or section group |
no test coverage detected