Final configuration changes in preparation for TS (#12351)

This commit is contained in:
Nicolò Ribaudo
2020-11-12 16:09:29 +01:00
committed by GitHub
parent 5bbad8936b
commit 3e0fa927c0
9 changed files with 45 additions and 63 deletions

View File

@@ -15,7 +15,7 @@ if (process.env.CI && parseInt(process.versions.node, 10) < 10) {
filename = filename || __filename;
const prettierConfig = prettier.resolveConfig.sync(filename);
prettierConfig.filepath = filename;
prettierConfig.parser = "babel";
prettierConfig.parser = filename.endsWith(".ts") ? "babel-ts" : "babel";
return prettier.format(code, prettierConfig);
};