diff --git a/biome.jsonc b/biome.jsonc index f8edeb4c7..af4601097 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -28,7 +28,11 @@ "linter": { "enabled": true, "rules": { - "recommended": true + "recommended": true, + "correctness": { + "noUnusedImports": "error", + "useHookAtTopLevel": "error" + } } }, "formatter": { diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 05f886d01..e65530c9e 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -28,7 +28,7 @@ export function App() { return ( - + {goatCounterCode && ( {/* Helmet is linked to . Used to add scripts. */} diff --git a/frontend/src/Components/DatePicker/DatePicker.tsx b/frontend/src/Components/DatePicker/DatePicker.tsx index e978c5f38..f4b2433f4 100644 --- a/frontend/src/Components/DatePicker/DatePicker.tsx +++ b/frontend/src/Components/DatePicker/DatePicker.tsx @@ -1,7 +1,7 @@ import { Icon } from '@iconify/react'; import classNames from 'classnames'; import { format } from 'date-fns'; -import React, { forwardRef, useMemo } from 'react'; +import { forwardRef, useMemo } from 'react'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; import { MiniCalendar } from '~/Components'; diff --git a/frontend/src/Components/Dropdown/Dropdown.stories.tsx b/frontend/src/Components/Dropdown/Dropdown.stories.tsx index efa82ab29..4f17df4d0 100644 --- a/frontend/src/Components/Dropdown/Dropdown.stories.tsx +++ b/frontend/src/Components/Dropdown/Dropdown.stories.tsx @@ -1,4 +1,4 @@ -import type { ComponentMeta, ComponentStory, Meta, StoryObj } from '@storybook/react'; +import type { Meta, StoryObj } from '@storybook/react'; import { Dropdown } from './Dropdown'; // Local component config. diff --git a/frontend/src/Components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx b/frontend/src/Components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx index 23103e743..49ddad243 100644 --- a/frontend/src/Components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx +++ b/frontend/src/Components/RecruitmentApplicantsStatus/RecruitmentApplicantsStatus.tsx @@ -1,10 +1,9 @@ import { useTranslation } from 'react-i18next'; -import { InputField, TimeDisplay } from '~/Components'; +import { TimeDisplay } from '~/Components'; import { CrudButtons } from '~/Components/CrudButtons/CrudButtons'; import { Dropdown, type DropdownOption } from '~/Components/Dropdown/Dropdown'; import { Table } from '~/Components/Table'; import { Text } from '~/Components/Text/Text'; -import { putRecruitmentApplicationForGang } from '~/api'; import type { RecruitmentApplicationDto, RecruitmentApplicationStateDto } from '~/dto'; import { useCustomNavigate } from '~/hooks'; import { KEY } from '~/i18n/constants'; diff --git a/frontend/src/Components/UserFeedback/UserFeedback.stories.tsx b/frontend/src/Components/UserFeedback/UserFeedback.stories.tsx index fc0feae02..03aae52a0 100644 --- a/frontend/src/Components/UserFeedback/UserFeedback.stories.tsx +++ b/frontend/src/Components/UserFeedback/UserFeedback.stories.tsx @@ -8,7 +8,7 @@ export default { } as ComponentMeta; const Template: ComponentStory = () => { - return ; + return ; }; export const Primary = Template.bind({}); diff --git a/frontend/src/Components/UserFeedback/UserFeedback.tsx b/frontend/src/Components/UserFeedback/UserFeedback.tsx index 711b3172d..d9b3a537a 100644 --- a/frontend/src/Components/UserFeedback/UserFeedback.tsx +++ b/frontend/src/Components/UserFeedback/UserFeedback.tsx @@ -10,23 +10,15 @@ import { useTextItem } from '~/hooks'; import { KEY } from '~/i18n/constants'; import styles from './UserFeedback.module.scss'; -type UserFeedbackProps = { - enabled: boolean; -}; - type FormProps = { text: string; contact_email?: string; }; -export function UserFeedback({ enabled }: UserFeedbackProps) { +export function UserFeedback() { const { t } = useTranslation(); const [isOpen, setIsOpen] = useState(false); - if (!enabled) { - return
; - } - const handleFormSubmit = (formData: FormProps) => { postFeedback({ ...formData, diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx index 9f0ef8c96..96dcc3d1d 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/RecruitmentInterviewGroupsList.tsx @@ -2,8 +2,8 @@ import { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { useParams } from 'react-router-dom'; import { toast } from 'react-toastify'; -import { getRecruitmentSharedInterviewGroups, getRecruitmentStats } from '~/api'; -import type { RecruitmentSharedInterviewGroupDto, RecruitmentStatsDto } from '~/dto'; +import { getRecruitmentSharedInterviewGroups } from '~/api'; +import type { RecruitmentSharedInterviewGroupDto } from '~/dto'; import { KEY } from '~/i18n/constants'; import styles from './RecruitmentInterviewGroupsList.module.scss'; import { RecruitmentInterviewGroupComponent } from './components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent'; diff --git a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx index 471c8260f..27dec86bb 100644 --- a/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx +++ b/frontend/src/PagesAdmin/RecruitmentGangOverviewPage/components/RecruitmentInterviewGroupsList/components/RecruitmentInterviewGroupComponent/RecruitmentInterviewGroupComponent.tsx @@ -1,5 +1,5 @@ import { ExpandableHeader, Table } from '~/Components'; -import type { RecruitmentSharedInterviewGroupDto, RecruitmentStatsDto } from '~/dto'; +import type { RecruitmentSharedInterviewGroupDto } from '~/dto'; import { dbT } from '~/utils'; import styles from './RecruitmentInterviewGroupComponent.module.scss';