Skip to content

Commit

Permalink
(PC-33809)[PRO] style: remove unused var and restore lint rule
Browse files Browse the repository at this point in the history
  • Loading branch information
asaez-pass committed Jan 6, 2025
1 parent 1f3b519 commit dba020e
Show file tree
Hide file tree
Showing 368 changed files with 50 additions and 430 deletions.
2 changes: 0 additions & 2 deletions pro/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ export default tseslint.config(
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'no-unused-vars': 'off',
'prefer-const': 'off',
'prefer-rest-params': 'off',
'react/react-in-jsx-scope': 'off',
Expand Down
1 change: 0 additions & 1 deletion pro/src/Root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { Provider } from 'react-redux'

import { AppRouter } from 'app/AppRouter/AppRouter'
Expand Down
1 change: 0 additions & 1 deletion pro/src/app/App/analytics/__specs__/firebase.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as firebaseAnalytics from '@firebase/analytics'
import * as firebase from '@firebase/app'
import * as firebaseRemoteConfig from '@firebase/remote-config'
import { waitFor } from '@testing-library/react'
import React from 'react'
import { expect, vi } from 'vitest'

import { firebaseConfig } from 'commons/config/firebase'
Expand Down
2 changes: 1 addition & 1 deletion pro/src/app/AppRouter/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as Sentry from '@sentry/react'
import React, { useEffect } from 'react'
import { useEffect } from 'react'
import { useRouteError } from 'react-router-dom'

import { Unavailable } from 'pages/Errors/Unavailable/Unavailable'
Expand Down
1 change: 0 additions & 1 deletion pro/src/app/AppRouter/subroutesReimbursements.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* No need to test this file */
/* istanbul ignore file */
import React from 'react'
import { Navigate } from 'react-router'

import { BankInformations } from 'pages/Reimbursements/BankInformations/BankInformations'
Expand Down
1 change: 0 additions & 1 deletion pro/src/app/AppRouter/subroutesSignupJourneyMap.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* No need to test this file */
/* istanbul ignore file */
import React from 'react'

import { Activity } from 'components/SignupJourneyForm/Activity/Activity'
import { OffererAuthentication } from 'components/SignupJourneyForm/Authentication/OffererAuthentication'
Expand Down
1 change: 0 additions & 1 deletion pro/src/app/AppRouter/subroutesSignupMap.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* No need to test this file */
/* istanbul ignore file */
import React from 'react'

import { SignupConfirmation } from 'pages/Signup/SignupConfirmation/SignupConfirmation'
import { SignupContainer } from 'pages/Signup/SignupContainer/SignupContainer'
Expand Down
5 changes: 0 additions & 5 deletions pro/src/commons/core/OfferEducational/utils/hasStatusCode.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
type Error = {
status: number
code: string
}

type ErrorWithErrorsCode = {
status: number
errors: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { render, screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import { Formik } from 'formik'
import React from 'react'

import { CheckboxGroup } from 'ui-kit/form/CheckboxGroup/CheckboxGroup'

Expand Down
2 changes: 0 additions & 2 deletions pro/src/commons/hooks/__specs__/useNotification.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { useNotification } from 'commons/hooks/useNotification'
import * as notificationReducer from 'commons/store/notifications/reducer'
import { renderWithProviders } from 'commons/utils/renderWithProviders'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { renderHook } from '@testing-library/react'
import React from 'react'
import { MemoryRouter } from 'react-router-dom'

import { OFFER_WIZARD_MODE } from 'commons/core/Offers/constants'
Expand Down
2 changes: 1 addition & 1 deletion pro/src/commons/store/StoreProvider/StoreProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useState } from 'react'
import { useEffect, useState } from 'react'
import { useDispatch } from 'react-redux'

import { api } from 'apiClient/api'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen } from '@testing-library/react'
import React from 'react'

import { api } from 'apiClient/api'
import { UserRole } from 'apiClient/v1'
Expand Down
2 changes: 1 addition & 1 deletion pro/src/commons/utils/renderWithProviders.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* istanbul ignore file: Those are test helpers, their coverage is not relevant */
import { render } from "@testing-library/react";
import React, { ReactNode } from "react";
import { ReactNode } from "react";
import { Provider } from "react-redux";
import { createMemoryRouter, RouterProvider } from "react-router-dom";
import { SWRConfig } from "swr";
Expand Down
2 changes: 1 addition & 1 deletion pro/src/commons/utils/timezone.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { de, fr } from 'date-fns/locale'
import { fr } from 'date-fns/locale'
import {
format,
formatInTimeZone,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from 'react'
import { ReactNode } from 'react'

import { AccessibilityEnum } from 'commons/core/shared/types'
import { SummaryDescriptionList } from 'components/SummaryLayout/SummaryDescriptionList'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { screen, waitFor, within } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React, { ComponentProps } from 'react'
import { ComponentProps } from 'react'
import { expect } from 'vitest'

import { api } from 'apiClient/api'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react'
import React from 'react'

import { BookingRecapStatus } from 'apiClient/v1'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import cn from 'classnames'
import React, { useEffect } from 'react'
import { useEffect } from 'react'

import { CollectiveBookingResponseModel } from 'apiClient/v1'
import { useAnalytics } from 'app/App/analytics/firebase'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import { api } from 'apiClient/api'
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen } from '@testing-library/react'
import React from 'react'

import {
bookingRecapFactory,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import {
BookingRecapResponseModel,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import { Audience } from 'commons/core/shared/types'
import { renderWithProviders } from 'commons/utils/renderWithProviders'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { pluralize } from 'commons/utils/pluralize'
import fullRefreshIcon from 'icons/full-refresh.svg'
import { Button } from 'ui-kit/Button/Button'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react'
import React from 'react'

import { Header, HeaderProps } from '../Header'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import fullRefresh from 'icons/full-refresh.svg'
import strokeSearchIcon from 'icons/stroke-search.svg'
import { Button } from 'ui-kit/Button/Button'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import { NoFilteredBookings } from '../NoFilteredBookings'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { PreFiltersParams } from 'commons/core/Bookings/types'
import { PeriodSelector } from 'ui-kit/form/PeriodSelector/PeriodSelector'

Expand Down
2 changes: 0 additions & 2 deletions pro/src/components/Bookings/PreFilters/FilterByEventDate.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { DEFAULT_PRE_FILTERS } from 'commons/core/Bookings/constants'
import { PreFiltersParams } from 'commons/core/Bookings/types'
import { isDateValid } from 'commons/utils/date'
Expand Down
2 changes: 0 additions & 2 deletions pro/src/components/Bookings/PreFilters/FilterByVenue.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import {
ALL_STRUCTURES_OPTION,
ALL_VENUES_OPTION,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import { EMPTY_FILTER_VALUE } from 'commons/core/Bookings/constants'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import createFetchMock from 'vitest-fetch-mock'
import { api } from 'apiClient/api'
import {
CollectiveOfferDisplayedStatus,
CollectiveOfferStatus,
CollectiveOfferAllowedAction,
CollectiveOfferTemplateAllowedAction,
OfferAddressType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
} from 'apiClient/v1'
import { computeURLCollectiveOfferId } from 'commons/core/OfferEducational/utils/computeURLCollectiveOfferId'
import { CollectiveSearchFiltersParams } from 'commons/core/Offers/types'
import { useActiveFeature } from 'commons/hooks/useActiveFeature'
import { CheckboxCell } from 'components/OffersTable/Cells/CheckboxCell'
import { OfferNameCell } from 'components/OffersTable/Cells/OfferNameCell/OfferNameCell'
import { OfferVenueCell } from 'components/OffersTable/Cells/OfferVenueCell'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { screen } from '@testing-library/react'

import {
CollectiveOfferDisplayedStatus,
CollectiveOfferStatus,
} from 'apiClient/v1'
import { renderWithProviders } from 'commons/utils/renderWithProviders'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import cn from 'classnames'
import { ReactElement } from 'react'

import {
CollectiveOfferStatus,
CollectiveOfferDisplayedStatus,
} from 'apiClient/v1'
import { useActiveFeature } from 'commons/hooks/useActiveFeature'
Expand Down
2 changes: 1 addition & 1 deletion pro/src/components/ConstraintCheck/ConstraintCheck.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { FunctionComponent } from 'react'
import { FunctionComponent } from 'react'

import { FieldError } from 'ui-kit/form/shared/FieldError/FieldError'

Expand Down
1 change: 0 additions & 1 deletion pro/src/components/FormLayout/FormLayout.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StoryObj } from '@storybook/react'
import { Formik } from 'formik'
import React from 'react'

import { Button } from 'ui-kit/Button/Button'
import { ButtonVariant } from 'ui-kit/Button/types'
Expand Down
1 change: 0 additions & 1 deletion pro/src/components/FormLayout/FormLayoutMandatoryInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import cn from 'classnames'
import React from 'react'

import style from './FormLayout.module.scss'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react'
import React from 'react'

import {
FormLayoutDescription,
Expand Down
1 change: 0 additions & 1 deletion pro/src/components/HelpLink/HelpLink.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react'
import { withRouter } from 'storybook-addon-remix-react-router'

import { HelpLink } from './HelpLink'
Expand Down
2 changes: 0 additions & 2 deletions pro/src/components/HelpLink/HelpLink.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { useAnalytics } from 'app/App/analytics/firebase'
import { Events } from 'commons/core/FirebaseEvents/constants'
import fullHelpIcon from 'icons/full-help.svg'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { StoryObj } from '@storybook/react'
import React from 'react'

import { ImagePreview, ImagePreviewScreenProps } from '../ImagePreview'
import { ImagePreviewsWrapper } from '../ImagePreviewsWrapper'
Expand Down
1 change: 0 additions & 1 deletion pro/src/components/ImageUploader/ImageUploader.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen } from '@testing-library/react'
import React from 'react'

import { renderWithProviders } from 'commons/utils/renderWithProviders'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import { RootState } from 'commons/store/rootReducer'
import { UploaderModeEnum } from 'components/ImageUploader/types'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { ImagePreview } from 'components/ImagePreview/ImagePreview'
import { ImagePreviewsWrapper } from 'components/ImagePreview/ImagePreviewsWrapper'
import homeShell from 'components/ImageUploader/assets/offer-home-shell.png'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen } from '@testing-library/react'
import React from 'react'

import { RootState } from 'commons/store/rootReducer'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen } from '@testing-library/react'
import React from 'react'

import { renderWithProviders } from 'commons/utils/renderWithProviders'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react'
import { useState } from 'react'

import fullTrashIcon from 'icons/full-trash.svg'
import { Button } from 'ui-kit/Button/Button'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { render, screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'

import { RootState } from 'commons/store/rootReducer'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as Dialog from '@radix-ui/react-dialog'
import { Form, FormikProvider, useFormik } from 'formik'
import React, { useRef } from 'react'
import { useRef } from 'react'
import AvatarEditor, { CroppedRect, Position } from 'react-avatar-editor'

import { useGetImageBitmap } from 'commons/hooks/useGetBitmap'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { ConfirmDialog } from 'components/ConfirmDialog/ConfirmDialog'
import strokeTrashIcon from 'icons/stroke-trash.svg'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { ConfirmDialog } from 'components/ConfirmDialog/ConfirmDialog'
import strokeTrashIcon from 'icons/stroke-trash.svg'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { ConfirmDialog } from 'components/ConfirmDialog/ConfirmDialog'

interface DialogStocksEventEditConfirmProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react'

import { OfferStatus } from 'apiClient/v1'
import { CGU_URL } from 'commons/utils/config'
import { Callout } from 'ui-kit/Callout/Callout'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { screen } from '@testing-library/react'
import { addDays } from 'date-fns'
import React from 'react'

import { OfferStatus } from 'apiClient/v1'
import { OFFER_WIZARD_MODE } from 'commons/core/Offers/constants'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import cn from 'classnames'
import type { FieldArrayRenderProps } from 'formik'
import { FieldArray, useFormikContext } from 'formik'
import { useState } from 'react'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import React from 'react'
import { generatePath, Route, Routes } from 'react-router-dom'

import { api } from 'apiClient/api'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { screen } from '@testing-library/react'
import React from 'react'

import { OfferStatus } from 'apiClient/v1'
import { getIndividualOfferFactory } from 'commons/utils/factories/individualApiFactories'
Expand Down
1 change: 0 additions & 1 deletion pro/src/components/IndividualOffer/Status/Status.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import cn from 'classnames'
import React from 'react'

import { GetIndividualOfferResponseModel } from 'apiClient/v1'
import { StatusToggleButton } from 'components/IndividualOffer/Status/StatusToggleButton'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { screen } from '@testing-library/react'
import { userEvent } from '@testing-library/user-event'
import { addDays } from 'date-fns'
import React from 'react'

import { api } from 'apiClient/api'
import { OfferStatus } from 'apiClient/v1'
Expand Down
Loading

0 comments on commit dba020e

Please sign in to comment.