From bc3c10d0d3ff99564132c1eba34c4478bf6b779e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=AF=E7=84=B6?= Date: Thu, 21 Apr 2022 13:52:53 +0800 Subject: [PATCH] fix: dts lint --write-file refs: #148 --- src/createEslintConfig.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index a7947b1b6..937694f2e 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -36,9 +36,7 @@ export async function createEslintConfig({ const file = path.join(rootDir, '.eslintrc.js'); // if the path is an abs path(e.g. "/Users/user/my-project/.eslintrc.js"), // need to convert a rel path to app root. - config.extends = config.extends.map((it) => - /^\//u.test(it) ? path.relative(rootDir, it) : it - ); + config.extends[0] = './' + path.relative(rootDir, config.extends[0]); try { await fs.writeFile( file,