* chore: fix lint

* fix: constants check:lint command

* chore(lint): permit unused vars which begin w/ _

* chore: rm dead code

* fix(lint): more lint fixes to constants pkg

* fix(lint): lint the live server

- fix lint issues

* chore: improve clean script

* fix(lint): more lint

* chore: set live server process title

* chore(deps): update to turbo@2.5.5

* chore(live): target node22

* fix(dev): add missing ui pkg dependency

* fix(dev): lint decorators

* fix(dev): lint space app

* fix(dev): address lint issues in types pkg

* fix(dev): lint editor pkg

* chore(dev): moar lint

* fix(dev): live server exit code

* chore: address PR feedback

* fix(lint): better TPageExtended type

* chore: refactor

* chore: revert most live server changes

* fix: few more lint issues

* chore: enable ci checks

Ensure we can build + confirm that lint is not getting worse.

* chore: address PR feedback

* fix: web lint warning added to package.json

* fix: ci:lint command

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Aaron Heckmann 2025-07-24 13:14:51 -07:00 committed by GitHub
parent 514686d9d5
commit 57479f4554
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
95 changed files with 348 additions and 460 deletions

View file

@ -2,7 +2,7 @@
import { observer } from "mobx-react";
// ui
import { GanttChartSquare, LayoutGrid, List } from "lucide-react";
import { GanttChartSquare, LayoutGrid, List, type LucideIcon } from "lucide-react";
// plane package imports
import { TCycleLayoutOptions } from "@plane/types";
import { CustomMenu } from "@plane/ui";
@ -11,7 +11,7 @@ import { useCycleFilter, useProject } from "@/hooks/store";
const CYCLE_VIEW_LAYOUTS: {
key: TCycleLayoutOptions;
icon: any;
icon: LucideIcon;
title: string;
}[] = [
{

View file

@ -14,7 +14,7 @@ import { PasswordStrengthMeter } from "@/components/account";
import { PageHead } from "@/components/core";
import { ProfileSettingContentHeader } from "@/components/profile";
// helpers
import { authErrorHandler } from "@/helpers/authentication.helper";
import { authErrorHandler, type EAuthenticationErrorCodes } from "@/helpers/authentication.helper";
// hooks
import { useUser } from "@/hooks/store";
// services
@ -87,8 +87,14 @@ const SecurityPage = observer(() => {
title: t("auth.common.password.toast.change_password.success.title"),
message: t("auth.common.password.toast.change_password.success.message"),
});
} catch (err: any) {
const errorInfo = authErrorHandler(err.error_code?.toString());
} catch (error: unknown) {
let errorInfo = undefined;
if (error instanceof Error) {
const err = error as Error & { error_code?: string };
const code = err.error_code?.toString();
errorInfo = code ? authErrorHandler(code as EAuthenticationErrorCodes) : undefined;
}
setToast({
type: TOAST_TYPE.ERROR,
title: errorInfo?.title ?? t("auth.common.password.toast.error.title"),

View file

@ -95,11 +95,17 @@ const SetPasswordPage = observer(() => {
if (!csrfToken) throw new Error("csrf token not found");
await handleSetPassword(csrfToken, { password: passwordFormData.password });
router.push("/");
} catch (err: any) {
} catch (error: unknown) {
let message = undefined;
if (error instanceof Error) {
const err = error as Error & { error?: string };
message = err.error;
}
setToast({
type: TOAST_TYPE.ERROR,
title: t("common.errors.default.title"),
message: err?.error ?? t("common.errors.default.message"),
message: message ?? t("common.errors.default.message"),
});
}
};

View file

@ -30,7 +30,7 @@ const CreateWorkspacePage = observer(() => {
const { data: currentUser } = useUser();
const { updateUserProfile } = useUserProfile();
// states
const [defaultValues, setDefaultValues] = useState({
const [defaultValues, setDefaultValues] = useState<Pick<IWorkspace, "name" | "slug" | "organization_size">>({
name: "",
slug: "",
organization_size: "",
@ -101,7 +101,7 @@ const CreateWorkspacePage = observer(() => {
<CreateWorkspaceForm
onSubmit={onSubmit}
defaultValues={defaultValues}
setDefaultValues={setDefaultValues as any}
setDefaultValues={setDefaultValues}
/>
</div>
</div>

View file

@ -42,10 +42,14 @@ const OnboardingPage = observer(() => {
// computed values
const workspacesList = Object.values(workspaces ?? {});
// fetching workspaces list
const { isLoading: workspaceListLoader } = useSWR(USER_WORKSPACES_LIST, () => {
user?.id && fetchWorkspaces();
if (user?.id) {
fetchWorkspaces();
}
});
// fetching user workspace invitations
const { isLoading: invitationsLoader, data: invitations } = useSWR(
`USER_WORKSPACE_INVITATIONS_LIST_${user?.id}`,

View file

@ -14,7 +14,7 @@ import { PasswordStrengthMeter } from "@/components/account/password-strength-me
import { PageHead } from "@/components/core/page-title";
import { ProfileSettingContentHeader, ProfileSettingContentWrapper } from "@/components/profile";
// helpers
import { authErrorHandler } from "@/helpers/authentication.helper";
import { authErrorHandler, type EAuthenticationErrorCodes } from "@/helpers/authentication.helper";
// hooks
import { useUser } from "@/hooks/store";
// services
@ -87,8 +87,10 @@ const SecurityPage = observer(() => {
title: t("auth.common.password.toast.change_password.success.title"),
message: t("auth.common.password.toast.change_password.success.message"),
});
} catch (err: any) {
const errorInfo = authErrorHandler(err.error_code?.toString());
} catch (error: unknown) {
const err = error as Error & { error_code?: string };
const code = err.error_code?.toString();
const errorInfo = code ? authErrorHandler(code as EAuthenticationErrorCodes) : undefined;
setToast({
type: TOAST_TYPE.ERROR,
title: errorInfo?.title ?? t("auth.common.password.toast.error.title"),