From 7ea2c480e9d204531bba53f0049c92eaafab9b71 Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Sat, 23 May 2026 10:18:04 -0700 Subject: [PATCH] chore(web/e2e): add dedicated tsconfig for Playwright specs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- web/e2e/tsconfig.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 web/e2e/tsconfig.json diff --git a/web/e2e/tsconfig.json b/web/e2e/tsconfig.json new file mode 100644 index 0000000..e07a893 --- /dev/null +++ b/web/e2e/tsconfig.json @@ -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": [] +}