Repository navigation
chore: add tsconfig.json for TypeScript project - #182
andrerfneves wants to merge 1 commit into
Conversation
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).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 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".
| "noEmit": true, | ||
|
|
||
| /* Linting */ | ||
| "strict": true, |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Adds a minimal
tsconfig.jsonto enable IDE-level TypeScript support. The project has TypeScript files (.tsx,.ts) but had notsconfig.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:bundlermodule resolution (works with Vite's esbuild compilation)react-jsxJSX transform (React 19 compatible)strictmode enabledallowJsfor mixed JS/TS codebasenoEmitsince Vite handles compilationWhy
tsconfig.json, VS Code and other editors fall back to inferred settings which may not match the project's actual requirementstsc --noEmittype checking in CITest Plan
npm run build)npm test)