Skip to content

Add optional TypeScript support#981

Merged
DavidMStraub merged 2 commits intogramps-project:mainfrom
DavidMStraub:add_ts_support
Mar 8, 2026
Merged

Add optional TypeScript support#981
DavidMStraub merged 2 commits intogramps-project:mainfrom
DavidMStraub:add_ts_support

Conversation

@DavidMStraub
Copy link
Member

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds optional TypeScript support to the Gramps Web frontend, allowing new files to be written in .ts while existing .js files remain untouched. The infrastructure changes span the build pipeline (Rollup), the dev server (esbuild), linting/formatting configuration, CI, and developer documentation.

Changes:

  • Adds @rollup/plugin-typescript for production builds and @web/dev-server-esbuild for dev server TypeScript transpilation, along with typescript, @typescript-eslint/parser, and a new tsconfig.json
  • Updates ESLint, Prettier, and lint-staged configurations to process both .js and .ts files
  • Adds a typecheck npm script (tsc --noEmit) and a corresponding CI step, and documents the TypeScript workflow in CLAUDE.md

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.json New TypeScript configuration with Lit decorator support, noEmit, and strict mode
rollup.config.js Adds @rollup/plugin-typescript to the Rollup plugin chain for production builds
web-dev-server.config.mjs Adds esbuildPlugin for TypeScript transpilation during development
package.json Adds TS-related devDependencies, updates lint/format scripts for .ts files, adds typecheck script, adds ESLint override for .ts files
package-lock.json Lock file updates for new dependencies
CLAUDE.md Documents TypeScript conventions, tooling, and Lit decorator usage
.github/workflows/test.yml Adds npm run typecheck step to CI pipeline

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@DavidMStraub DavidMStraub merged commit 84ade5d into gramps-project:main Mar 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants