diff --git a/apps/vojtechmares.com/package.json b/apps/vojtechmares.com/package.json index 4962af2..e2ea75a 100644 --- a/apps/vojtechmares.com/package.json +++ b/apps/vojtechmares.com/package.json @@ -38,6 +38,7 @@ "prettier-plugin-tailwindcss": "^0.3.0", "tailwindcss": "^3.2.4", "typescript": "^5.0.0", + "tsconfig": "workspace:*", "vite": "^4.3.9", "vitest": "^0.31.0" }, diff --git a/apps/vojtechmares.com/tsconfig.json b/apps/vojtechmares.com/tsconfig.json index d90131f..5fa7c46 100644 --- a/apps/vojtechmares.com/tsconfig.json +++ b/apps/vojtechmares.com/tsconfig.json @@ -1,13 +1,12 @@ { + "$schema": "https://json.schemastore.org/tsconfig", + "extends": "tsconfig/nextjs.json", "include": [ "next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts" ], - "exclude": [ - "node_modules" - ], "compilerOptions": { "baseUrl": ".", "paths": { @@ -15,35 +14,6 @@ "./*" ] }, - "composite": false, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "inlineSources": false, - "isolatedModules": true, - "moduleResolution": "node", - "noUnusedLocals": false, - "noUnusedParameters": false, - "preserveWatchOutput": true, - "skipLibCheck": true, - "strict": true, - "target": "es5", - "lib": [ - "dom", - "dom.iterable", - "esnext" - ], - "allowJs": true, - "noEmit": true, - "incremental": true, - "module": "esnext", - "resolveJsonModule": true, - "jsx": "preserve", - "plugins": [ - { - "name": "next" - } - ] + "strictNullChecks": true } } diff --git a/packages/tsconfig/base.json b/packages/tsconfig/base.json new file mode 100644 index 0000000..39ef7ed --- /dev/null +++ b/packages/tsconfig/base.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Default", + "compilerOptions": { + "composite": false, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "allowImportingTsExtensions": true, + "noEmit": true, + "inlineSources": false, + "isolatedModules": true, + "moduleResolution": "node", + "noUnusedLocals": false, + "noUnusedParameters": false, + "preserveWatchOutput": true, + "skipLibCheck": true, + "strict": true, + "strictNullChecks": true + }, + "exclude": ["node_modules"] +} diff --git a/packages/tsconfig/nextjs.json b/packages/tsconfig/nextjs.json new file mode 100644 index 0000000..f4c755d --- /dev/null +++ b/packages/tsconfig/nextjs.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Next.js", + "extends": "./base.json", + "compilerOptions": { + "plugins": [{ "name": "next" }], + "allowJs": true, + "declaration": false, + "declarationMap": false, + "incremental": true, + "jsx": "preserve", + "lib": ["dom", "dom.iterable", "esnext"], + "module": "esnext", + "resolveJsonModule": true, + "strict": true, + "strictNullChecks": true, + "target": "es5" + }, + "include": ["src", "next-env.d.ts"], + "exclude": ["node_modules"] +} diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json new file mode 100644 index 0000000..77f2a65 --- /dev/null +++ b/packages/tsconfig/package.json @@ -0,0 +1,8 @@ +{ + "name": "tsconfig", + "version": "0.0.0", + "private": true, + "publishConfig": { + "access": "public" + } +}