Skip to content

fix: update tsconfig and type declarations for TypeScript 6 compatibility#106

Closed
Copilot wants to merge 1 commit into
dependabot/npm_and_yarn/npm-version-c08b6f7e85from
copilot/fix-github-actions-job-test
Closed

fix: update tsconfig and type declarations for TypeScript 6 compatibility#106
Copilot wants to merge 1 commit into
dependabot/npm_and_yarn/npm-version-c08b6f7e85from
copilot/fix-github-actions-job-test

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

The chore(deps) bump upgraded TypeScript from ^5.9.3^6.0.3, breaking the webpack build with multiple new errors enforced in TS6.

Changes

tsconfig.json

  • Set "rootDir": "./src/js/react" — satisfies new TS6 requirement to explicitly set rootDir when outDir is configured (TS5011)
  • Change "moduleResolution": "node""bundler"node/node10 is deprecated in TS6 (TS5107); bundler is the correct setting for webpack
  • Add exclude for **/__tests__/**, **/*.test.ts/tsx, **/*.spec.ts/tsxsrc/js/react/**/* was pulling test files into ts-loader compilation, causing unresolved jest globals (describe, it, expect, jest) to fail the build (TS2593/TS2304)

global.d.ts

  • Move *.module.css declaration before the new *.css wildcard so the more specific pattern takes precedence
  • Add declare module '*.css' {} — TS6 now requires explicit type declarations for CSS side-effect imports like import '@primer/primitives/dist/css/...' (TS2882)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

draft PR is in draft

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants