From 55887d296014bb8f079ba5ce2e561874a31f42a2 Mon Sep 17 00:00:00 2001 From: Gearonix Date: Fri, 6 Oct 2023 17:06:23 +0300 Subject: [PATCH] ci: fixes --- .eslintrc.js | 3 --- apps/client/tsconfig.json | 3 ++- apps/server/tsconfig.json | 3 ++- package.json | 2 +- packages/api/common/package.json | 6 ++---- packages/api/common/project.json | 3 ++- packages/api/common/tsconfig.json | 3 ++- packages/api/services/tsconfig.json | 3 ++- packages/config/src/tsconfig/base.json | 3 ++- packages/config/tsconfig.json | 3 ++- packages/web/editor/tsconfig.json | 3 ++- packages/web/shared/tsconfig.json | 3 ++- packages/web/ui/tsconfig.json | 3 ++- yarn.lock | 8 +++----- 14 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 51434078..7bdd77c6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,9 +5,6 @@ module.exports = grnx({ tsconfig: 'tsconfig.base.json', monorepo: true, ext: { - 'import/export': 'off', - 'import/no-default-export': 'off', - 'import/no-self-import': 'off', 'max-len': 'off' } }) diff --git a/apps/client/tsconfig.json b/apps/client/tsconfig.json index c500f48d..c20a950a 100644 --- a/apps/client/tsconfig.json +++ b/apps/client/tsconfig.json @@ -10,7 +10,8 @@ "jsxFactory": "h", "jsxFragmentFactory": "Fragment", "jsxImportSource": "preact", - "types": ["vite/client", "vitest"] + "types": ["vite/client", "vitest"], + "strictNullChecks": true }, "files": [], "include": [], diff --git a/apps/server/tsconfig.json b/apps/server/tsconfig.json index 12829d6e..184487bf 100644 --- a/apps/server/tsconfig.json +++ b/apps/server/tsconfig.json @@ -12,6 +12,7 @@ ], "compilerOptions": { "esModuleInterop": true, - "resolveJsonModule": true + "resolveJsonModule": true, + "strictNullChecks": true } } diff --git a/package.json b/package.json index 719c4ef5..be8bcc27 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", "tsconfig-paths-webpack-plugin": "^4.1.0", - "typescript": "^5.2.2", + "typescript": "^5.1.9", "vite": "^4.4.11", "vite-plugin-dts": "^3.6.0", "vite-plugin-dynamic-import": "^1.5.0", diff --git a/packages/api/common/package.json b/packages/api/common/package.json index 2546b2f2..73cdd81a 100644 --- a/packages/api/common/package.json +++ b/packages/api/common/package.json @@ -1,7 +1,5 @@ { "name": "cg-api-common", - "version": "0.0.1", - "type": "commonjs", - "main": "./src/index.js", - "typings": "./src/index.d.ts" + "version": "1.0.0", + "main": "./src/index.js" } diff --git a/packages/api/common/project.json b/packages/api/common/project.json index fc920876..fb4eb06c 100644 --- a/packages/api/common/project.json +++ b/packages/api/common/project.json @@ -29,7 +29,8 @@ "lintFilePatterns": [ "packages/api/common/**/*.ts", "packages/api/common/package.json" - ] + ], + "fix": true } }, "test": { diff --git a/packages/api/common/tsconfig.json b/packages/api/common/tsconfig.json index e62af455..18163c90 100644 --- a/packages/api/common/tsconfig.json +++ b/packages/api/common/tsconfig.json @@ -7,7 +7,8 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "strictNullChecks": true }, "files": [], "include": [], diff --git a/packages/api/services/tsconfig.json b/packages/api/services/tsconfig.json index d789ed30..bbe46951 100644 --- a/packages/api/services/tsconfig.json +++ b/packages/api/services/tsconfig.json @@ -9,7 +9,8 @@ "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + "strictNullChecks": true }, "files": [], "include": [], diff --git a/packages/config/src/tsconfig/base.json b/packages/config/src/tsconfig/base.json index 04874075..397c3e8d 100644 --- a/packages/config/src/tsconfig/base.json +++ b/packages/config/src/tsconfig/base.json @@ -11,6 +11,7 @@ "module": "esnext", "lib": ["es2020", "dom"], "skipLibCheck": true, - "skipDefaultLibCheck": true + "skipDefaultLibCheck": true, + "strictNullChecks": true } } diff --git a/packages/config/tsconfig.json b/packages/config/tsconfig.json index db25900c..f71a38bc 100644 --- a/packages/config/tsconfig.json +++ b/packages/config/tsconfig.json @@ -5,7 +5,8 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "module": "ESNext", - "moduleResolution": "Node" + "moduleResolution": "Node", + "strictNullChecks": true }, "files": [], "include": ["src/**/*.ts"], diff --git a/packages/web/editor/tsconfig.json b/packages/web/editor/tsconfig.json index 000c0070..942d5ec6 100644 --- a/packages/web/editor/tsconfig.json +++ b/packages/web/editor/tsconfig.json @@ -6,7 +6,8 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, - "types": ["vite/client", "vitest"] + "types": ["vite/client", "vitest"], + "strictNullChecks": true }, "files": [], "include": [], diff --git a/packages/web/shared/tsconfig.json b/packages/web/shared/tsconfig.json index 3867e2c9..e57ea691 100644 --- a/packages/web/shared/tsconfig.json +++ b/packages/web/shared/tsconfig.json @@ -6,7 +6,8 @@ "esModuleInterop": false, "allowSyntheticDefaultImports": true, "strict": true, - "types": ["vite/client", "vitest"] + "types": ["vite/client", "vitest"], + "strictNullChecks": true }, "files": [], "include": [], diff --git a/packages/web/ui/tsconfig.json b/packages/web/ui/tsconfig.json index 126ba852..005fc2ae 100644 --- a/packages/web/ui/tsconfig.json +++ b/packages/web/ui/tsconfig.json @@ -9,7 +9,8 @@ "types": [ "vite/client", "vitest" - ] + ], + "strictNullChecks": true }, "files": [], "include": [], diff --git a/yarn.lock b/yarn.lock index a9c238ed..6f1b580c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2652,7 +2652,7 @@ __metadata: tsconfig-paths: ^4.2.0 tsconfig-paths-webpack-plugin: ^4.1.0 tslib: ^2.6.2 - typescript: ^5.2.2 + typescript: ^5.1.9 uuid: ^9.0.1 vite: ^4.4.11 vite-plugin-dts: ^3.6.0 @@ -12382,8 +12382,6 @@ __metadata: "cg-api-common@workspace:packages/api/common": version: 0.0.0-use.local resolution: "cg-api-common@workspace:packages/api/common" - dependencies: - tslib: ^2.3.0 languageName: unknown linkType: soft @@ -29059,7 +29057,7 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^4.6.4 || ^5.0.0, typescript@npm:^5.2.2": +"typescript@npm:^4.6.4 || ^5.0.0, typescript@npm:^5.1.9": version: 5.2.2 resolution: "typescript@npm:5.2.2" bin: @@ -29089,7 +29087,7 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@^4.6.4 || ^5.0.0#~builtin, typescript@patch:typescript@^5.2.2#~builtin": +"typescript@patch:typescript@^4.6.4 || ^5.0.0#~builtin, typescript@patch:typescript@^5.1.9#~builtin": version: 5.2.2 resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" bin: