diff options
Diffstat (limited to 'std/prettier/main.ts')
-rwxr-xr-x | std/prettier/main.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/std/prettier/main.ts b/std/prettier/main.ts index bd9238be2..2937a9751 100755 --- a/std/prettier/main.ts +++ b/std/prettier/main.ts @@ -191,9 +191,9 @@ async function formatFile( * Selects the right prettier parser for the given path. */ function selectParser(path: string): ParserLabel | null { - if (/\.ts$/.test(path)) { + if (/\.tsx?$/.test(path)) { return "typescript"; - } else if (/\.js$/.test(path)) { + } else if (/\.jsx?$/.test(path)) { return "babel"; } else if (/\.json$/.test(path)) { return "json"; |