Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"allowJs": true,
"checkJs": false,
"resolveJsonModule": true,
"isolatedModules": true,
"moduleDetection": "force",
"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 👍 / 👎.

"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,

/* React */
"jsx": "react-jsx"
},
"include": ["src"]
}
Loading