From efe57a987f826a4759cc556605a163dfa0ff3562 Mon Sep 17 00:00:00 2001 From: Arthur L-Brjc Date: Wed, 18 Dec 2024 10:58:41 +0100 Subject: [PATCH] fix: eslint --- components/ConfirmationUpdateRdvModal.tsx | 3 +-- .../jeune/BeneficiairesMultiselectAutocomplete.tsx | 7 +++---- components/jeune/TableauBeneficiaires.tsx | 3 +-- components/rdv/OngletAgendaEtablissement.tsx | 3 +-- components/ui/Navigation/Tab.tsx | 3 +-- components/ui/SelecteurPeriode.tsx | 5 ++--- eslint.config.mjs | 9 ++++++++- 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/components/ConfirmationUpdateRdvModal.tsx b/components/ConfirmationUpdateRdvModal.tsx index 32c80026e..6902a916c 100644 --- a/components/ConfirmationUpdateRdvModal.tsx +++ b/components/ConfirmationUpdateRdvModal.tsx @@ -1,9 +1,8 @@ import { useRef } from 'react' -import IconComponent, { IconName } from './ui/IconComponent' - import Modal, { ModalHandles } from 'components/Modal' import Button, { ButtonStyle } from 'components/ui/Button/Button' +import IconComponent, { IconName } from 'components/ui/IconComponent' interface ConfirmationUpdateRdvModalProps { onConfirmation: () => void diff --git a/components/jeune/BeneficiairesMultiselectAutocomplete.tsx b/components/jeune/BeneficiairesMultiselectAutocomplete.tsx index f7882cbc0..e1df9dede 100644 --- a/components/jeune/BeneficiairesMultiselectAutocomplete.tsx +++ b/components/jeune/BeneficiairesMultiselectAutocomplete.tsx @@ -1,8 +1,7 @@ import React, { ReactElement, useEffect, useRef, useState } from 'react' -import { ButtonStyle } from '../ui/Button/Button' -import ButtonLink from '../ui/Button/ButtonLink' - +import { ButtonStyle } from 'components/ui/Button/Button' +import ButtonLink from 'components/ui/Button/ButtonLink' import { InputError } from 'components/ui/Form/InputError' import Label from 'components/ui/Form/Label' import Multiselection from 'components/ui/Form/Multiselection' @@ -307,7 +306,7 @@ export default function BeneficiairesMultiselectAutocomplete({

{typeSelection} ({countBeneficiairesUniques()}) {lienExport && trackExport && ( diff --git a/components/jeune/TableauBeneficiaires.tsx b/components/jeune/TableauBeneficiaires.tsx index 4edfa47d3..6901ba020 100644 --- a/components/jeune/TableauBeneficiaires.tsx +++ b/components/jeune/TableauBeneficiaires.tsx @@ -2,10 +2,9 @@ import { DateTime } from 'luxon' import dynamic from 'next/dynamic' import React, { ForwardedRef, forwardRef, useEffect, useState } from 'react' -import SortIcon from '../ui/SortIcon' - import EmptyState from 'components/EmptyState' import { IllustrationName } from 'components/ui/IllustrationComponent' +import SortIcon from 'components/ui/SortIcon' import Pagination from 'components/ui/Table/Pagination' import Table from 'components/ui/Table/Table' import { BeneficiaireAvecInfosComplementaires } from 'interfaces/beneficiaire' diff --git a/components/rdv/OngletAgendaEtablissement.tsx b/components/rdv/OngletAgendaEtablissement.tsx index fb6a43ff2..94895b176 100644 --- a/components/rdv/OngletAgendaEtablissement.tsx +++ b/components/rdv/OngletAgendaEtablissement.tsx @@ -1,13 +1,12 @@ import { DateTime } from 'luxon' import React, { useEffect, useRef, useState } from 'react' -import ResettableTextInput from '../ui/Form/ResettableTextInput' - import EmptyState from 'components/EmptyState' import { AnimationCollectiveRow } from 'components/rdv/AnimationCollectiveRow' import FiltresStatutAnimationsCollectives, { FiltresHandles, } from 'components/rdv/FiltresStatutAnimationsCollectives' +import ResettableTextInput from 'components/ui/Form/ResettableTextInput' import IconComponent, { IconName } from 'components/ui/IconComponent' import { IllustrationName } from 'components/ui/IllustrationComponent' import { SelecteurPeriode } from 'components/ui/SelecteurPeriode' diff --git a/components/ui/Navigation/Tab.tsx b/components/ui/Navigation/Tab.tsx index 5e55bcca4..7b87837ac 100644 --- a/components/ui/Navigation/Tab.tsx +++ b/components/ui/Navigation/Tab.tsx @@ -1,5 +1,4 @@ -import IconComponent, { IconName } from '../IconComponent' - +import IconComponent, { IconName } from 'components/ui/IconComponent' import { Badge } from 'components/ui/Indicateurs/Badge' export interface TabProps { diff --git a/components/ui/SelecteurPeriode.tsx b/components/ui/SelecteurPeriode.tsx index 7be5d8d31..abcfd921f 100644 --- a/components/ui/SelecteurPeriode.tsx +++ b/components/ui/SelecteurPeriode.tsx @@ -1,9 +1,8 @@ import { DateTime } from 'luxon' import React, { ReactElement, useEffect, useRef, useState } from 'react' -import Button, { ButtonStyle } from './Button/Button' -import IconComponent, { IconName } from './IconComponent' - +import Button, { ButtonStyle } from 'components/ui/Button/Button' +import IconComponent, { IconName } from 'components/ui/IconComponent' import { toLongMonthDate, toShortDate } from 'utils/date' import { useDebounce } from 'utils/hooks/useDebounce' diff --git a/eslint.config.mjs b/eslint.config.mjs index 8b08c3e82..c7ee51c5c 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -29,7 +29,14 @@ const eslintConfig = [ }, 'newlines-between': 'always', - groups: ['builtin', 'external', 'parent', 'sibling', 'index'], + groups: [ + 'builtin', + 'external', + 'internal', + 'parent', + 'sibling', + 'index', + ], pathGroupsExcludedImportTypes: ['builtin'], }, ],