Skip to content

chore: add tsconfig.json for TypeScript project - #182

Open
andrerfneves wants to merge 1 commit into
mainfrom
maintenance/add-tsconfig-20260614
Open

andrerfneves wants to merge 1 commit into
mainfrom
maintenance/add-tsconfig-20260614

Conversation

@andrerfneves

Copy link
Copy Markdown
Owner

Summary

Adds a minimal tsconfig.json to enable IDE-level TypeScript support. The project has TypeScript files (.tsx, .ts) but had no tsconfig.json, so IDEs relied on inferred defaults and type checking couldn't be run in CI.

Changes

  • tsconfig.json: New file with Vite + React 19 compatible settings:
    • bundler module resolution (works with Vite's esbuild compilation)
    • react-jsx JSX transform (React 19 compatible)
    • strict mode enabled
    • allowJs for mixed JS/TS codebase
    • noEmit since Vite handles compilation

Why

  • Without a tsconfig.json, VS Code and other editors fall back to inferred settings which may not match the project's actual requirements
  • Prevents ambiguity about TypeScript configuration for new contributors
  • Enables future tsc --noEmit type checking in CI
  • Standard for any TypeScript project

Test Plan

  • Existing build completes successfully (npm run build)
  • All 52 existing tests pass (npm test)
  • No behavior change — this is a configuration-only addition

The project has ~20 TypeScript files (.tsx, .ts) but no tsconfig.json,
which meant:
- No IDE-level TypeScript configuration or path aliases
- No way to run tsc --noEmit for type checking
- IDE intellisense relied on VS Code's inferred defaults

This adds a minimal tsconfig.json compatible with Vite + React 19
(bundler module resolution, react-jsx transform, strict mode).
@vercel

vercel Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lightning-decoder Ready Ready Preview, Comment Jun 14, 2026 6:05pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc17bfe62c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tsconfig.json
"noEmit": true,

/* Linting */
"strict": true,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Disable strict until included sources type-check

When this config is used for the advertised tsc --noEmit/IDE checks, strict enables strictNullChecks on the whole included src tree. The current sources are not strict-clean: parseInvoice() can return null in src/utils/invoices.js, and src/app.tsx immediately dereferences result.error after await parseInvoice(...), producing TS18047 under this tsconfig. That means the new project config is red on first use rather than enabling type checking; either fix the existing strict errors or start with non-strict settings.

Useful? React with 👍 / 👎.

This branch was successfully deployed

1 active deployment
Preview — dc17bfe6 Deployed Jun 14, 2026 by vercel[bot]
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.

1 participant