chore(web/e2e): add dedicated tsconfig for Playwright specs

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)
This commit is contained in:
saravanakumardb1 2026-05-23 10:18:04 -07:00
parent e89f5ce8e6
commit 7ea2c480e9

10
web/e2e/tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"//": "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": []
}