diff --git a/package.json b/package.json index b2dd3d4..d3973a9 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "test:unit": "vitest", "db:generate": "drizzle-kit generate:sqlite", "db:push": "drizzle-kit push:sqlite", - "db:migrate": "tsx --tsconfig ./tsconfig.json ./scripts/migrate.ts" + "db:migrate": "tsx --tsconfig ./scripts/tsconfig.json ./scripts/migrate.ts" }, "devDependencies": { "@playwright/test": "^1.28.1", diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json new file mode 100644 index 0000000..31b155c --- /dev/null +++ b/scripts/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + // enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", // support JSX + "allowJs": true, // allow importing `.js` from `.ts` + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags + "useUnknownInCatchVariables": true, + "noPropertyAccessFromIndexSignature": true + } +}