Skip to content

Commit

Permalink
fix: add tsconfig.json for playwright tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sodatea committed Nov 18, 2022
1 parent a1405c8 commit 3a946b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ async function init() {
if (needsCypressCT) {
render('tsconfig/cypress-ct')
}
if (needsPlaywright) {
render('tsconfig/playwright')
}
if (needsVitest) {
render('tsconfig/vitest')
}
Expand Down
4 changes: 4 additions & 0 deletions template/tsconfig/playwright/e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "@vue/tsconfig/tsconfig.node.json",
"include": ["./**/*"]
}

0 comments on commit 3a946b6

Please sign in to comment.