From 992410fdde7f8d5764ff5e9972f5caf22c431a39 Mon Sep 17 00:00:00 2001 From: gearnode Date: Wed, 26 Feb 2025 12:38:09 +0100 Subject: [PATCH] Fix eslint errors Signed-off-by: gearnode --- apps/console/eslint.config.js | 2 -- apps/console/src/hooks/use-toast.ts | 17 ++++------------- .../src/pages/OrganizationSelectionPage.tsx | 10 ++-------- apps/console/src/pages/PeopleListPage.tsx | 2 +- 4 files changed, 7 insertions(+), 24 deletions(-) diff --git a/apps/console/eslint.config.js b/apps/console/eslint.config.js index cf9e935b9..ebf7302eb 100644 --- a/apps/console/eslint.config.js +++ b/apps/console/eslint.config.js @@ -27,8 +27,6 @@ export default [ rules: { "react/react-in-jsx-scope": "off", "react/prop-types": "off", - "@typescript-eslint/no-explicit-any": "warn", - "react/no-unescaped-entities": "off" } } ]; \ No newline at end of file diff --git a/apps/console/src/hooks/use-toast.ts b/apps/console/src/hooks/use-toast.ts index 6555e795c..603772187 100644 --- a/apps/console/src/hooks/use-toast.ts +++ b/apps/console/src/hooks/use-toast.ts @@ -15,13 +15,6 @@ type ToasterToast = ToastProps & { action?: ToastActionElement; }; -const actionTypes = { - ADD_TOAST: "ADD_TOAST", - UPDATE_TOAST: "UPDATE_TOAST", - DISMISS_TOAST: "DISMISS_TOAST", - REMOVE_TOAST: "REMOVE_TOAST", -} as const; - let count = 0; function genId() { @@ -29,23 +22,21 @@ function genId() { return count.toString(); } -type ActionType = typeof actionTypes; - type Action = | { - type: ActionType["ADD_TOAST"]; + type: "ADD_TOAST"; toast: ToasterToast; } | { - type: ActionType["UPDATE_TOAST"]; + type: "UPDATE_TOAST"; toast: Partial; } | { - type: ActionType["DISMISS_TOAST"]; + type: "DISMISS_TOAST"; toastId?: ToasterToast["id"]; } | { - type: ActionType["REMOVE_TOAST"]; + type: "REMOVE_TOAST"; toastId?: ToasterToast["id"]; }; diff --git a/apps/console/src/pages/OrganizationSelectionPage.tsx b/apps/console/src/pages/OrganizationSelectionPage.tsx index f45f55058..4a2d07465 100644 --- a/apps/console/src/pages/OrganizationSelectionPage.tsx +++ b/apps/console/src/pages/OrganizationSelectionPage.tsx @@ -8,10 +8,8 @@ import { CardHeader, CardTitle, CardDescription, - CardContent, CardFooter, } from "@/components/ui/card"; -import { useToast } from "@/hooks/use-toast"; import { Plus } from "lucide-react"; import { OrganizationSelectionPageQuery } from "./__generated__/OrganizationSelectionPageQuery.graphql"; @@ -34,7 +32,6 @@ const organizationSelectionQuery = graphql` export default function OrganizationSelectionPage() { const navigate = useNavigate(); - const { toast } = useToast(); const data = useLazyLoadQuery( organizationSelectionQuery, {} @@ -45,13 +42,11 @@ export default function OrganizationSelectionPage() { ); useEffect(() => { - // If there's only one organization, redirect to it automatically if (organizations.length === 1) { navigate(`/organizations/${organizations[0].id}`); } }, [organizations, navigate]); - // If no organizations, show a message to create one if (organizations.length === 0) { return (
@@ -63,8 +58,8 @@ export default function OrganizationSelectionPage() { Welcome to Probo - You don't have any organizations yet. Create your first one to - get started. + You don{"'"}t have any organizations yet. Create your first one + to get started. @@ -81,7 +76,6 @@ export default function OrganizationSelectionPage() { ); } - // If multiple organizations, show a selection screen return (
diff --git a/apps/console/src/pages/PeopleListPage.tsx b/apps/console/src/pages/PeopleListPage.tsx index 2234078a3..2ae99fa8e 100644 --- a/apps/console/src/pages/PeopleListPage.tsx +++ b/apps/console/src/pages/PeopleListPage.tsx @@ -164,7 +164,7 @@ function PeopleListContent({

Employees

- Keep track of your company's workforce and their progress towards + Keep track of your company{"'"}s workforce and their progress towards completing tasks assigned to them.