From d34a1a47717ee3fe905031abfd06190cc92e42d1 Mon Sep 17 00:00:00 2001 From: Rushil Perera Date: Tue, 14 May 2024 22:11:44 -0400 Subject: [PATCH] style: add tsconfig path Summary: Test Plan: --- tsconfig.json | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 612fe2c..0a09870 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,30 @@ { "compilerOptions": { + "types": ["@cloudflare/workers-types"], + "baseUrl": "./", + "paths": { + "~/*": ["src/*"] + }, + + // Enable latest features + "lib": ["ESNext"], "target": "ESNext", "module": "ESNext", - "moduleResolution": "Bundler", + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices "strict": true, "skipLibCheck": true, - "lib": ["ESNext"], - "types": ["@cloudflare/workers-types"], - "jsx": "react-jsx", - "jsxImportSource": "hono/jsx" + "noFallthroughCasesInSwitch": true, + + // Some stricter flags + "noUnusedLocals": true, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": true } }