From 4d4d6c01b96b9f209da5a49939a3430e3cb639ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Wed, 7 Feb 2024 14:08:54 +0800 Subject: [PATCH] feat: tseslint refs: https://github.com/typescript-eslint/typescript-eslint/pull/7935 --- lib/config-generator.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/config-generator.js b/lib/config-generator.js index 14bc58a..e4ce170 100644 --- a/lib/config-generator.js +++ b/lib/config-generator.js @@ -126,7 +126,6 @@ export class ConfigGenerator { } } - // eslint-disable-next-line jsdoc/require-throws -- ts is not supported yet /** * Calculate the configuration based on the user's answers. * @returns {void} @@ -179,11 +178,9 @@ export class ConfigGenerator { if (this.answers.lang === "ts") { - throw new Error("typescript is not supported yet."); - - // this.result.devDependencies.push("@typescript-eslint/eslint-plugin"); - // importContent += "import pluginTs from \"@typescript-eslint/eslint-plugin\";\n"; - // exportContent += " pluginTs.configs.recommended,\n"; + this.result.devDependencies.push("typescript-eslint"); + importContent += "import tseslint from \"typescript-eslint\";\n"; + exportContent += " tseslint.configs.recommended,\n"; } if (this.answers.framework === "vue") {