From 3a946b6a740b755faf2bf9da92b8d8de6d72c832 Mon Sep 17 00:00:00 2001 From: Haoqun Jiang Date: Fri, 18 Nov 2022 18:12:01 +0800 Subject: [PATCH] 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. --- index.ts | 3 +++ template/tsconfig/playwright/e2e/tsconfig.json | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 template/tsconfig/playwright/e2e/tsconfig.json 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": ["./**/*"] +} -- 2.39.5