From: Haoqun Jiang Date: Fri, 18 Nov 2022 10:12:01 +0000 (+0800) Subject: fix: add tsconfig.json for playwright tests X-Git-Tag: v3.4.1~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a946b6a740b755faf2bf9da92b8d8de6d72c832;p=thirdparty%2Fvuejs%2Fcreate-vue.git fix: add tsconfig.json for playwright tests 1. Avoid "The file must be included in at least one of the projects provided" error when using type-aware ESLint configurations; 2. It's recommended by the [playwright documentation](https://playwright.dev/docs/test-typescript#tsconfigjson): > We recommend setting up a separate `tsconfig.json` in the tests directory so that you can change some preferences specifically for the tests. --- diff --git a/index.ts b/index.ts index e6f1df9a..02c9e49b 100755 --- a/index.ts +++ b/index.ts @@ -336,6 +336,9 @@ async function init() { if (needsCypressCT) { render('tsconfig/cypress-ct') } + if (needsPlaywright) { + render('tsconfig/playwright') + } if (needsVitest) { render('tsconfig/vitest') } diff --git a/template/tsconfig/playwright/e2e/tsconfig.json b/template/tsconfig/playwright/e2e/tsconfig.json new file mode 100644 index 00000000..239accd1 --- /dev/null +++ b/template/tsconfig/playwright/e2e/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "@vue/tsconfig/tsconfig.node.json", + "include": ["./**/*"] +}