fix: typescript support fix, add some params to editor, etc

This commit is contained in:
2024-02-28 22:32:31 +00:00
parent 7bdd995394
commit 543260479a
16 changed files with 136 additions and 34 deletions
+7 -2
View File
@@ -130,13 +130,18 @@ function getLangMetadata(lang: string) {
case "js":
case "ts":
case "tsx":
const isTypescript = ["tsx", "ts"].includes(lang);
extensions = [
javascript({
jsx: ["jsx", "tsx"].includes(lang),
typescript: ["tsx", "ts"].includes(lang),
typescript: isTypescript,
}),
];
formatter = ["babel", prettierBabelPlugin, prettierPluginEstree];
formatter = [
isTypescript ? "babel-ts" : "babel",
prettierBabelPlugin,
prettierPluginEstree,
];
break;
}