From 1fc370973106e7445a1eadf7ffbf2a40b7928f51 Mon Sep 17 00:00:00 2001 From: sriram veeraghanta Date: Mon, 19 May 2025 16:25:46 +0530 Subject: [PATCH] chore: Strict Null Check in Admin app (#7081) * chore: upgrade to latest version of turbo repo * fix: tsconfig changes * chore: adding format script to package json * fix: formatting of files --- admin/app/authentication/github/form.tsx | 6 +- .../admin-sidebar/sidebar-dropdown.tsx | 2 +- admin/core/store/instance.store.ts | 2 +- .../authentication/authentication-modes.tsx | 2 +- admin/package.json | 1 + admin/tsconfig.json | 9 ++- package.json | 2 +- yarn.lock | 68 +++++++++---------- 8 files changed, 47 insertions(+), 45 deletions(-) diff --git a/admin/app/authentication/github/form.tsx b/admin/app/authentication/github/form.tsx index 91795ea70..0c6d81ae6 100644 --- a/admin/app/authentication/github/form.tsx +++ b/admin/app/authentication/github/form.tsx @@ -98,11 +98,7 @@ export const InstanceGithubConfigForm: FC = (props) => { key: "GITHUB_ORGANIZATION_ID", type: "text", label: "Organization ID", - description: ( - <> - The organization github ID. - - ), + description: <>The organization github ID., placeholder: "123456789", error: Boolean(errors.GITHUB_ORGANIZATION_ID), required: false, diff --git a/admin/core/components/admin-sidebar/sidebar-dropdown.tsx b/admin/core/components/admin-sidebar/sidebar-dropdown.tsx index 501d501d8..0cde7f551 100644 --- a/admin/core/components/admin-sidebar/sidebar-dropdown.tsx +++ b/admin/core/components/admin-sidebar/sidebar-dropdown.tsx @@ -7,7 +7,7 @@ import { LogOut, UserCog2, Palette } from "lucide-react"; import { Menu, Transition } from "@headlessui/react"; // plane internal packages import { API_BASE_URL } from "@plane/constants"; -import {AuthService } from "@plane/services"; +import { AuthService } from "@plane/services"; import { Avatar } from "@plane/ui"; import { getFileURL, cn } from "@plane/utils"; // hooks diff --git a/admin/core/store/instance.store.ts b/admin/core/store/instance.store.ts index 9b25a2469..33954fe73 100644 --- a/admin/core/store/instance.store.ts +++ b/admin/core/store/instance.store.ts @@ -2,7 +2,7 @@ import set from "lodash/set"; import { observable, action, computed, makeObservable, runInAction } from "mobx"; // plane internal packages import { EInstanceStatus, TInstanceStatus } from "@plane/constants"; -import {InstanceService} from "@plane/services"; +import { InstanceService } from "@plane/services"; import { IInstance, IInstanceAdmin, diff --git a/admin/ee/components/authentication/authentication-modes.tsx b/admin/ee/components/authentication/authentication-modes.tsx index 3a8ab7d1d..4e3b05a52 100644 --- a/admin/ee/components/authentication/authentication-modes.tsx +++ b/admin/ee/components/authentication/authentication-modes.tsx @@ -1 +1 @@ -export * from "ce/components/authentication/authentication-modes"; \ No newline at end of file +export * from "ce/components/authentication/authentication-modes"; diff --git a/admin/package.json b/admin/package.json index 0ee292f03..15de77757 100644 --- a/admin/package.json +++ b/admin/package.json @@ -10,6 +10,7 @@ "build": "next build", "preview": "next build && next start", "start": "next start", + "format": "prettier --write .", "lint": "eslint . --ext .ts,.tsx", "lint:errors": "eslint . --ext .ts,.tsx --quiet" }, diff --git a/admin/tsconfig.json b/admin/tsconfig.json index e32f01e6a..df72d07b4 100644 --- a/admin/tsconfig.json +++ b/admin/tsconfig.json @@ -1,14 +1,19 @@ { "extends": "@plane/typescript-config/nextjs.json", "compilerOptions": { - "plugins": [{ "name": "next" }], + "plugins": [ + { + "name": "next" + } + ], "baseUrl": ".", "paths": { "@/*": ["core/*"], "@/public/*": ["public/*"], "@/plane-admin/*": ["ce/*"], "@/styles/*": ["styles/*"] - } + }, + "strictNullChecks": true }, "include": ["next-env.d.ts", "next.config.js", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "exclude": ["node_modules"] diff --git a/package.json b/package.json index 152ab6a23..593d84459 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "devDependencies": { "prettier": "latest", "prettier-plugin-tailwindcss": "^0.5.4", - "turbo": "^2.5.2" + "turbo": "^2.5.3" }, "resolutions": { "nanoid": "3.3.8", diff --git a/yarn.lock b/yarn.lock index d3211c449..6976451fa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11183,47 +11183,47 @@ tunnel-agent@^0.6.0: dependencies: safe-buffer "^5.0.1" -turbo-darwin-64@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo-darwin-64/-/turbo-darwin-64-2.5.2.tgz#892927344ad37679143555ebdf41ad704f4d72d8" - integrity sha512-2aIl0Sx230nLk+Cg2qSVxvPOBWCZpwKNuAMKoROTvWKif6VMpkWWiR9XEPoz7sHeLmCOed4GYGMjL1bqAiIS/g== +turbo-darwin-64@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo-darwin-64/-/turbo-darwin-64-2.5.3.tgz#e1f19e816f76e0d636e31e66f8238c43bf870f45" + integrity sha512-YSItEVBUIvAGPUDpAB9etEmSqZI3T6BHrkBkeSErvICXn3dfqXUfeLx35LfptLDEbrzFUdwYFNmt8QXOwe9yaw== -turbo-darwin-arm64@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo-darwin-arm64/-/turbo-darwin-arm64-2.5.2.tgz#c3a00bcba481f5baa24ce4b1302f09c2c50d4e30" - integrity sha512-MrFYhK/jYu8N6QlqZtqSHi3e4QVxlzqU3ANHTKn3/tThuwTLbNHEvzBPWSj5W7nZcM58dCqi6gYrfRz6bJZyAA== +turbo-darwin-arm64@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo-darwin-arm64/-/turbo-darwin-arm64-2.5.3.tgz#f80074fd786f703bcb0415e13df225ba781950fc" + integrity sha512-5PefrwHd42UiZX7YA9m1LPW6x9YJBDErXmsegCkVp+GjmWrADfEOxpFrGQNonH3ZMj77WZB2PVE5Aw3gA+IOhg== -turbo-linux-64@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo-linux-64/-/turbo-linux-64-2.5.2.tgz#1f366e0208b4da79d13d57df202dc5f49fb0367c" - integrity sha512-LxNqUE2HmAJQ/8deoLgMUDzKxd5bKxqH0UBogWa+DF+JcXhtze3UTMr6lEr0dEofdsEUYK1zg8FRjglmwlN5YA== +turbo-linux-64@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo-linux-64/-/turbo-linux-64-2.5.3.tgz#93bfe009a24a76295c8164896845b5098c293293" + integrity sha512-M9xigFgawn5ofTmRzvjjLj3Lqc05O8VHKuOlWNUlnHPUltFquyEeSkpQNkE/vpPdOR14AzxqHbhhxtfS4qvb1w== -turbo-linux-arm64@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo-linux-arm64/-/turbo-linux-arm64-2.5.2.tgz#a48d9f1eddd279d523682eb74911b5c045ae1092" - integrity sha512-0MI1Ao1q8zhd+UUbIEsrM+yLq1BsrcJQRGZkxIsHFlGp7WQQH1oR3laBgfnUCNdCotCMD6w4moc9pUbXdOR3bg== +turbo-linux-arm64@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo-linux-arm64/-/turbo-linux-arm64-2.5.3.tgz#bf4664561094711aa289d92b9443de2aefca5d6e" + integrity sha512-auJRbYZ8SGJVqvzTikpg1bsRAsiI9Tk0/SDkA5Xgg0GdiHDH/BOzv1ZjDE2mjmlrO/obr19Dw+39OlMhwLffrw== -turbo-windows-64@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo-windows-64/-/turbo-windows-64-2.5.2.tgz#6ad0604fd7b1e53c54feca037de74e4303e23fa1" - integrity sha512-hOLcbgZzE5ttACHHyc1ajmWYq4zKT42IC3G6XqgiXxMbS+4eyVYTL+7UvCZBd3Kca1u4TLQdLQjeO76zyDJc2A== +turbo-windows-64@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo-windows-64/-/turbo-windows-64-2.5.3.tgz#acbc2db093c7a74f0e692b899e649284285a2e7b" + integrity sha512-arLQYohuHtIEKkmQSCU9vtrKUg+/1TTstWB9VYRSsz+khvg81eX6LYHtXJfH/dK7Ho6ck+JaEh5G+QrE1jEmCQ== -turbo-windows-arm64@2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo-windows-arm64/-/turbo-windows-arm64-2.5.2.tgz#8bf9e79d2f3adf92371ef79da89c04090f3ab914" - integrity sha512-fMU41ABhSLa18H8V3Z7BMCGynQ8x+wj9WyBMvWm1jeyRKgkvUYJsO2vkIsy8m0vrwnIeVXKOIn6eSe1ddlBVqw== +turbo-windows-arm64@2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo-windows-arm64/-/turbo-windows-arm64-2.5.3.tgz#78e8cfdb49b69fbadf03031532f1524be3661729" + integrity sha512-3JPn66HAynJ0gtr6H+hjY4VHpu1RPKcEwGATvGUTmLmYSYBQieVlnGDRMMoYN066YfyPqnNGCfhYbXfH92Cm0g== -turbo@^2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/turbo/-/turbo-2.5.2.tgz#c6be6379f7495166fb0cc87d5362da8c7e4093c6" - integrity sha512-Qo5lfuStr6LQh3sPQl7kIi243bGU4aHGDQJUf6ylAdGwks30jJFloc9NYHP7Y373+gGU9OS0faA4Mb5Sy8X9Xw== +turbo@^2.5.3: + version "2.5.3" + resolved "https://registry.yarnpkg.com/turbo/-/turbo-2.5.3.tgz#657dcae430552d9bb237e9e1d91f711c465c9f28" + integrity sha512-iHuaNcq5GZZnr3XDZNuu2LSyCzAOPwDuo5Qt+q64DfsTP1i3T2bKfxJhni2ZQxsvAoxRbuUK5QetJki4qc5aYA== optionalDependencies: - turbo-darwin-64 "2.5.2" - turbo-darwin-arm64 "2.5.2" - turbo-linux-64 "2.5.2" - turbo-linux-arm64 "2.5.2" - turbo-windows-64 "2.5.2" - turbo-windows-arm64 "2.5.2" + turbo-darwin-64 "2.5.3" + turbo-darwin-arm64 "2.5.3" + turbo-linux-64 "2.5.3" + turbo-linux-arm64 "2.5.3" + turbo-windows-64 "2.5.3" + turbo-windows-arm64 "2.5.3" tween-functions@^1.2.0: version "1.2.0"