From e8bbaa48de5c8dd708ef1186b146427385e56dea Mon Sep 17 00:00:00 2001 From: Axel Pettersson Date: Sun, 17 Sep 2023 12:59:44 +0200 Subject: [PATCH] Eject tsconfig to its own package --- apps/admin/package.json | 3 ++- apps/admin/tsconfig.json | 2 +- apps/web/package.json | 3 ++- apps/web/tsconfig.json | 2 +- packages/tsconfig/package.json | 4 ++++ tsconfig.json => packages/tsconfig/tsconfig.json | 0 pnpm-lock.yaml | 8 ++++++++ 7 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 packages/tsconfig/package.json rename tsconfig.json => packages/tsconfig/tsconfig.json (100%) diff --git a/apps/admin/package.json b/apps/admin/package.json index 5fff2bc23..187189ace 100644 --- a/apps/admin/package.json +++ b/apps/admin/package.json @@ -6,7 +6,7 @@ "build": "next build", "start": "next start", "lint": "next lint", - "typecheck": "pnpm tsc -p ./tsconfig.json" + "typecheck": "pnpm tsc" }, "dependencies": { "next": "13.4.19", @@ -15,6 +15,7 @@ "zod": "3.22.2" }, "devDependencies": { + "@partiguiden/tsconfig": "workspace:*", "@types/node": "20.6.0", "@types/react": "18.2.21", "@types/react-dom": "18.2.7", diff --git a/apps/admin/tsconfig.json b/apps/admin/tsconfig.json index 447923680..2ef9b8a83 100644 --- a/apps/admin/tsconfig.json +++ b/apps/admin/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "@partiguiden/tsconfig", "compilerOptions": { "plugins": [ { diff --git a/apps/web/package.json b/apps/web/package.json index df811e704..266c693d3 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -9,7 +9,7 @@ "start": "next start", "build": "next build", "postbuild": "next-sitemap", - "typecheck": "tsc -p ./tsconfig.json", + "typecheck": "tsc", "lint": "next lint" }, "repository": { @@ -41,6 +41,7 @@ }, "devDependencies": { "@partiguiden/eslint-config-base": "workspace:*", + "@partiguiden/tsconfig": "workspace:*", "@types/gtag.js": "0.0.13", "@types/jsdom": "21.1.2", "@types/node": "20.6.0", diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 648caa139..ef09bdbb5 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../tsconfig.json", + "extends": "@partiguiden/tsconfig", "compilerOptions": { "jsxImportSource": "@emotion/react", "plugins": [ diff --git a/packages/tsconfig/package.json b/packages/tsconfig/package.json new file mode 100644 index 000000000..5b066e757 --- /dev/null +++ b/packages/tsconfig/package.json @@ -0,0 +1,4 @@ +{ + "name": "@partiguiden/tsconfig", + "version": "1.0.0" +} diff --git a/tsconfig.json b/packages/tsconfig/tsconfig.json similarity index 100% rename from tsconfig.json rename to packages/tsconfig/tsconfig.json diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 581faaf5d..175bdc68f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,9 @@ importers: specifier: 3.22.2 version: 3.22.2 devDependencies: + '@partiguiden/tsconfig': + specifier: workspace:* + version: link:../../packages/tsconfig '@types/node': specifier: 20.6.0 version: 20.6.0 @@ -113,6 +116,9 @@ importers: '@partiguiden/eslint-config-base': specifier: workspace:* version: link:../../packages/eslint-config-base + '@partiguiden/tsconfig': + specifier: workspace:* + version: link:../../packages/tsconfig '@types/gtag.js': specifier: 0.0.13 version: 0.0.13 @@ -159,6 +165,8 @@ importers: specifier: ^3.0.3 version: 3.0.3 + packages/tsconfig: {} + packages: /@aashutoshrathi/word-wrap@1.2.6: