From b6aa47a52dd588a6c11c502474cfbd74e1977e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20B=C3=B6hm?= Date: Sun, 25 Aug 2024 20:21:09 +0200 Subject: [PATCH] feat(tsconfig): sync astro with the latest docs --- .changeset/eighty-yaks-roll.md | 5 ++++ package.json | 1 + packages/commitlint-config/tsconfig.json | 2 +- packages/eslint-config/tsconfig.json | 2 +- packages/prettier-config/tsconfig.json | 2 +- packages/tsconfig/{ => configs}/astro.json | 26 +++++++++++-------- packages/tsconfig/{ => configs}/base.json | 0 packages/tsconfig/{ => configs}/commonjs.json | 0 packages/tsconfig/{ => configs}/esm.json | 0 packages/tsconfig/{ => configs}/nextjs.json | 0 packages/tsconfig/{ => configs}/react.json | 0 packages/tsconfig/package.json | 17 +++--------- 12 files changed, 27 insertions(+), 28 deletions(-) create mode 100644 .changeset/eighty-yaks-roll.md rename packages/tsconfig/{ => configs}/astro.json (77%) rename packages/tsconfig/{ => configs}/base.json (100%) rename packages/tsconfig/{ => configs}/commonjs.json (100%) rename packages/tsconfig/{ => configs}/esm.json (100%) rename packages/tsconfig/{ => configs}/nextjs.json (100%) rename packages/tsconfig/{ => configs}/react.json (100%) diff --git a/.changeset/eighty-yaks-roll.md b/.changeset/eighty-yaks-roll.md new file mode 100644 index 0000000..58307c5 --- /dev/null +++ b/.changeset/eighty-yaks-roll.md @@ -0,0 +1,5 @@ +--- +'@mheob/tsconfig': minor +--- + +Sync astro with the latest official docs. diff --git a/package.json b/package.json index a87b8be..e2623fa 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "type": "module", "scripts": { "build": "turbo run build", + "changeset": "changeset", "clean": "turbo run clean", "clean:root": "rm -rf .turbo && rm -rf node_modules", "cspell": "cspell .", diff --git a/packages/commitlint-config/tsconfig.json b/packages/commitlint-config/tsconfig.json index 7ed9b10..78c30f2 100644 --- a/packages/commitlint-config/tsconfig.json +++ b/packages/commitlint-config/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig/base.json", + "extends": "../tsconfig/configs/base", "compilerOptions": { "rootDir": "src", "declaration": true, diff --git a/packages/eslint-config/tsconfig.json b/packages/eslint-config/tsconfig.json index 7a5ebe8..1da6a58 100644 --- a/packages/eslint-config/tsconfig.json +++ b/packages/eslint-config/tsconfig.json @@ -1,4 +1,4 @@ { - "extends": "../tsconfig/base.json", + "extends": "../tsconfig/configs/base", "include": ["src/**/*"] } diff --git a/packages/prettier-config/tsconfig.json b/packages/prettier-config/tsconfig.json index 7ed9b10..78c30f2 100644 --- a/packages/prettier-config/tsconfig.json +++ b/packages/prettier-config/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig/base.json", + "extends": "../tsconfig/configs/base", "compilerOptions": { "rootDir": "src", "declaration": true, diff --git a/packages/tsconfig/astro.json b/packages/tsconfig/configs/astro.json similarity index 77% rename from packages/tsconfig/astro.json rename to packages/tsconfig/configs/astro.json index 0e4afa2..b44f38b 100644 --- a/packages/tsconfig/astro.json +++ b/packages/tsconfig/configs/astro.json @@ -1,23 +1,27 @@ { "$schema": "https://json.schemastore.org/tsconfig", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Node", - "strict": true, - "resolveJsonModule": true, + "allowJs": true, + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "esModuleInterop": true, + "exactOptionalPropertyTypes": true, + "forceConsistentCasingInFileNames": true, "isolatedModules": true, + "jsx": "preserve", + "module": "ESNext", + "moduleResolution": "Bundler", "noEmit": true, - "forceConsistentCasingInFileNames": true, - "esModuleInterop": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, "noImplicitReturns": true, + "noUncheckedIndexedAccess": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noUncheckedIndexedAccess": true, - "exactOptionalPropertyTypes": true, - "allowUnreachableCode": false, - "allowUnusedLabels": false + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ESNext", + "verbatimModuleSyntax": true } } diff --git a/packages/tsconfig/base.json b/packages/tsconfig/configs/base.json similarity index 100% rename from packages/tsconfig/base.json rename to packages/tsconfig/configs/base.json diff --git a/packages/tsconfig/commonjs.json b/packages/tsconfig/configs/commonjs.json similarity index 100% rename from packages/tsconfig/commonjs.json rename to packages/tsconfig/configs/commonjs.json diff --git a/packages/tsconfig/esm.json b/packages/tsconfig/configs/esm.json similarity index 100% rename from packages/tsconfig/esm.json rename to packages/tsconfig/configs/esm.json diff --git a/packages/tsconfig/nextjs.json b/packages/tsconfig/configs/nextjs.json similarity index 100% rename from packages/tsconfig/nextjs.json rename to packages/tsconfig/configs/nextjs.json diff --git a/packages/tsconfig/react.json b/packages/tsconfig/configs/react.json similarity index 100% rename from packages/tsconfig/react.json rename to packages/tsconfig/configs/react.json diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json index 64e5d7c..98ccdf0 100644 --- a/packages/tsconfig/package.json +++ b/packages/tsconfig/package.json @@ -18,22 +18,11 @@ "license": "MIT", "author": "Alexander Böhm ", "exports": { - ".": "./commonjs.json", - "./astro": "./astro.json", - "./base": "./base.json", - "./commonjs": "./commonjs.json", - "./esm": "./esm.json", - "./nextjs": "./nextjs.json", - "./react": "./react.json" + ".": "./configs/commonjs.json", + "./*": "./configs/*.json" }, - "main": "commonjs.json", "files": [ - "astro.json", - "base.json", - "commonjs.json", - "esm.json", - "nextjs.json", - "react.json" + "configs" ], "scripts": {}, "publishConfig": {