Add optional TypeScript support#981
Merged
DavidMStraub merged 2 commits intogramps-project:mainfrom Mar 8, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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-typescriptfor production builds and@web/dev-server-esbuildfor dev server TypeScript transpilation, along withtypescript,@typescript-eslint/parser, and a newtsconfig.json - Updates ESLint, Prettier, and lint-staged configurations to process both
.jsand.tsfiles - Adds a
typechecknpm script (tsc --noEmit) and a corresponding CI step, and documents the TypeScript workflow inCLAUDE.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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.