From f2d7bc15dad48118606b2a271aa79a1e5a1ad75d Mon Sep 17 00:00:00 2001 From: Danijel Martinek Date: Mon, 6 Apr 2026 14:06:00 +0200 Subject: [PATCH] feat: add shared TypeScript config package (@repo/typescript-config) --- packages/typescript-config/base.json | 21 +++++++++++++++++++ packages/typescript-config/nextjs.json | 13 ++++++++++++ packages/typescript-config/package.json | 5 +++++ packages/typescript-config/react-library.json | 8 +++++++ 4 files changed, 47 insertions(+) create mode 100644 packages/typescript-config/base.json create mode 100644 packages/typescript-config/nextjs.json create mode 100644 packages/typescript-config/package.json create mode 100644 packages/typescript-config/react-library.json diff --git a/packages/typescript-config/base.json b/packages/typescript-config/base.json new file mode 100644 index 0000000..339821d --- /dev/null +++ b/packages/typescript-config/base.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "compilerOptions": { + "target": "ES2022", + "lib": ["ES2022"], + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "declaration": true, + "declarationMap": true, + "isolatedModules": true, + "esModuleInterop": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "noUncheckedIndexedAccess": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true + }, + "exclude": ["node_modules", "dist"] +} diff --git a/packages/typescript-config/nextjs.json b/packages/typescript-config/nextjs.json new file mode 100644 index 0000000..817e252 --- /dev/null +++ b/packages/typescript-config/nextjs.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./base.json", + "compilerOptions": { + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "jsx": "preserve", + "module": "ESNext", + "moduleResolution": "bundler", + "noEmit": true, + "incremental": true, + "plugins": [{ "name": "next" }] + } +} diff --git a/packages/typescript-config/package.json b/packages/typescript-config/package.json new file mode 100644 index 0000000..1b9354b --- /dev/null +++ b/packages/typescript-config/package.json @@ -0,0 +1,5 @@ +{ + "name": "@repo/typescript-config", + "private": true, + "version": "0.0.0" +} diff --git a/packages/typescript-config/react-library.json b/packages/typescript-config/react-library.json new file mode 100644 index 0000000..8ca3caf --- /dev/null +++ b/packages/typescript-config/react-library.json @@ -0,0 +1,8 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "./base.json", + "compilerOptions": { + "lib": ["ES2022", "DOM", "DOM.Iterable"], + "jsx": "react-jsx" + } +}