The parent web/tsconfig.json explicitly excludes the e2e folder because
Next.js doesn't compile Playwright specs. As a result, IDE TypeScript
language servers had no project context for e2e/*.spec.ts files and
false-positive on Node globals like Buffer, process.env, and the
NodeJS namespace — which several specs use to sign fake JWTs
(Buffer.from(...).toString('base64url')) or to read NOTELETT_E2E_*
override env vars.
The new web/e2e/tsconfig.json:
- Extends the parent web/tsconfig.json so all path aliases and
react-jsx config stay consistent.
- Adds 'types': ['node', '@playwright/test'] so Node globals and
Playwright fixtures resolve.
- Resets exclude: [] so the parent's e2e exclusion doesn't recurse
in and re-exclude the very directory this config is meant to
cover (which would otherwise yield TS18003 'No inputs found').
Verified:
- npx tsc --noEmit -p web/e2e/tsconfig.json → no output (clean)
- pnpm --filter @notelett/web run typecheck → still passes
(e2e remains out of the main typecheck as before)
- Playwright run unaffected (it uses tsx, not tsc, for runtime)
11 lines
648 B
JSON
11 lines
648 B
JSON
{
|
|
"//": "Dedicated tsconfig for Playwright e2e specs. The parent web/tsconfig.json explicitly excludes e2e because Next.js doesn't compile these files. This sibling config provides Node.js globals (process, Buffer, NodeJS namespace) so IDE TypeScript language servers don't false-positive on spec files that use Buffer.from() to sign fake JWTs or process.env to override URLs. Playwright itself uses tsx, which has these globals at runtime regardless of this file.",
|
|
"extends": "../tsconfig.json",
|
|
"compilerOptions": {
|
|
"types": ["node", "@playwright/test"],
|
|
"noEmit": true
|
|
},
|
|
"include": ["**/*.ts", "**/*.tsx"],
|
|
"exclude": []
|
|
}
|