chore(client): drop the React imports nothing reads

typescript-eslint 8.74 no longer takes the classic JSX pragma for the automatic runtime, so an unused default React import is reported now. The no-unused-vars baseline of the app code drops by the one it already counted.
This commit is contained in:
Maurice
2026-11-28 17:48:04 +01:00
parent edb1eab0c3
commit d6ce33c51c
75 changed files with 6 additions and 75 deletions
-1
View File
@@ -1,4 +1,3 @@
import React from 'react'
import { render, screen, waitFor, act } from '@testing-library/react'
import { MemoryRouter, useLocation } from 'react-router'
import { describe, it, expect, beforeEach, onTestFinished, vi } from 'vitest'
-1
View File
@@ -1,4 +1,3 @@
import React from 'react'
import { render, waitFor, act } from '@testing-library/react'
import { MemoryRouter } from 'react-router'
import { describe, it, expect, beforeEach, vi } from 'vitest'
-1
View File
@@ -1,4 +1,3 @@
import React from 'react'
import { render, screen } from '@testing-library/react'
import { MemoryRouter } from 'react-router'
import { describe, it, expect, beforeEach, vi } from 'vitest'
@@ -1,5 +1,4 @@
// FE-COMP-MSAVESHEET-001 to FE-COMP-MSAVESHEET-016
import React from 'react';
import { afterEach, beforeEach } from 'vitest';
import { render, screen, fireEvent, waitFor, within } from '../../../tests/helpers/render';
import type { Collection, CollectionListResponse, CollectionMembership, CollectionSaveResult } from '@trek/shared';
@@ -1,5 +1,4 @@
// FE-COMP-SAVETOCOL-001 to FE-COMP-SAVETOCOL-020
import React from 'react';
import { afterEach, beforeEach } from 'vitest';
import { render, screen, fireEvent, waitFor, within } from '../../../tests/helpers/render';
import type { Collection, CollectionListResponse, CollectionMembership, CollectionSaveResult } from '@trek/shared';
@@ -1,4 +1,3 @@
import React from 'react';
import { describe, it, expect, beforeEach, vi } from 'vitest';
import { http, HttpResponse } from 'msw';
import { render, screen, fireEvent, waitFor } from '../../../tests/helpers/render';
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, beforeEach } from 'vitest'
import { render, screen, fireEvent } from '../../../tests/helpers/render'
import { useHelpStore } from '../../store/helpStore'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, beforeEach } from 'vitest'
import { http, HttpResponse } from 'msw'
import { render, screen, fireEvent, waitFor, within, act } from '../../../tests/helpers/render'
@@ -1,5 +1,4 @@
// FE-COMP-JOURNEYDATEPICKER-001 to FE-COMP-JOURNEYDATEPICKER-008
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { render, screen } from '../../../tests/helpers/render'
import userEvent from '@testing-library/user-event'
@@ -25,7 +25,6 @@
* what stops Leaflet from being handed zero-length polylines on every trip that
* has no recording.
*/
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { render, screen } from '@testing-library/react'
import type { DawarichTrack, DawarichTrackDay } from '@trek/shared'
@@ -1,5 +1,4 @@
// FE-COMP-MAPCOMPASS-001 to FE-COMP-MAPCOMPASS-007
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { render, screen, fireEvent, act } from '../../../tests/helpers/render'
import { MapCompassPill, type CompassMap } from './MapCompassPill'
@@ -1,5 +1,4 @@
// FE-COMP-MAPLAYER-001 to FE-COMP-MAPLAYER-024
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { render, screen, fireEvent } from '../../../tests/helpers/render'
import { MapLayerSwitcher, TourMapLayerSwitcher, MAP_ROUND_CONTROL_SIZE } from './MapLayerSwitcher'
@@ -10,7 +10,7 @@
* The click itself has to keep taking Leaflet's route and the page's: it is what closes
* an open popup on the map, and an open context menu beside it.
*/
import React, { useState } from 'react'
import { useState } from 'react'
import { flushSync } from 'react-dom'
import { describe, it, expect, vi, beforeAll, afterAll, afterEach } from 'vitest'
import { render, waitFor, act } from '../../../tests/helpers/render'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect } from 'vitest'
import { render, screen } from '@testing-library/react'
import PlaceHoverCard from './PlaceHoverCard'
@@ -1,4 +1,3 @@
import React from 'react'
import { createPortal } from 'react-dom'
import { useState, useRef, useEffect, useMemo } from 'react'
import { Plane, X, Check } from 'lucide-react'
@@ -1,5 +1,4 @@
// FE-PLANNER-DAYDETAIL-001 to FE-PLANNER-DAYDETAIL-101
import React from 'react';
import { fireEvent, render, screen, waitFor, within, act } from '../../../tests/helpers/render';
import userEvent from '@testing-library/user-event';
import { http, HttpResponse } from 'msw';
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
import { fireEvent, render, screen } from '../../../tests/helpers/render'
import AnchoredPopover from './AnchoredPopover'
@@ -1,4 +1,3 @@
import React from 'react'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
import { TranslationProvider } from '../../i18n'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, expect, it, vi } from 'vitest'
import { fireEvent, render, screen } from '@testing-library/react'
import { Footprints } from 'lucide-react'
@@ -1,4 +1,3 @@
import React from 'react'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { fireEvent, render, screen, waitFor } from '@testing-library/react'
import { TranslationProvider } from '../../i18n'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { fireEvent, render, screen } from '../../../tests/helpers/render'
import { useSettingsStore } from '../../store/settingsStore'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { Fuel, Zap, Utensils } from 'lucide-react'
import { fireEvent, render, screen, within } from '../../../tests/helpers/render'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { fireEvent, render, screen } from '../../../tests/helpers/render'
import RoadtripDayPicker from './RoadtripDayPicker'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { fireEvent, render, screen } from '../../../tests/helpers/render'
import { useSettingsStore } from '../../store/settingsStore'
@@ -1,4 +1,3 @@
import React from 'react'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { fireEvent, render, screen, within } from '@testing-library/react'
import { TranslationProvider } from '../../i18n'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi, beforeEach } from 'vitest'
import { fireEvent, render, screen, waitFor } from '../../../tests/helpers/render'
import { useSettingsStore } from '../../store/settingsStore'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
import { fireEvent, render, screen } from '../../../tests/helpers/render'
import { useSettingsStore } from '../../store/settingsStore'
@@ -1,4 +1,3 @@
import React from 'react'
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'
import { fireEvent, render, screen } from '../../../tests/helpers/render'
import StopKindPicker from './StopKindPicker'
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '../../../tests/helpers/render';
import userEvent from '@testing-library/user-event';
import { resetAllStores } from '../../../tests/helpers/store';
@@ -1,4 +1,3 @@
import React from 'react'
import { selectionHaptic } from '../../native/haptics'
/** The track and the knob glide with the same easing the planner's panels use. */
@@ -1,7 +1,6 @@
// FE-COMP-VCYCAL-001 to FE-COMP-VCYCAL-010
// Covers what the mocked month card in VacayCalendar.test.tsx cannot reach: the
// trip overlay, the per-day maps handed down to the cards, and the hover tooltip.
import React from 'react'
import { describe, it, expect, beforeEach, vi } from 'vitest'
import { http, HttpResponse } from 'msw'
import { render, screen, fireEvent, waitFor, within } from '../../../tests/helpers/render'
@@ -1,5 +1,4 @@
// FE-COMP-VCYMC-001 to FE-COMP-VCYMC-004
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import { render, screen, fireEvent, within } from '../../../tests/helpers/render'
import VacayMonthCard from './VacayMonthCard'
@@ -1,5 +1,4 @@
// FE-COMP-VCYPERS-001 to FE-COMP-VCYPERS-007
import React from 'react'
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
import { http, HttpResponse } from 'msw'
import { render, screen, fireEvent, waitFor, within } from '../../../tests/helpers/render'
@@ -1,7 +1,6 @@
// FE-COMP-VCYSET-001 to FE-COMP-VCYSET-016
// Covers the calendar editor / draft rows and the leave-year block of VacaySettings,
// which VacaySettings.test.tsx only reaches at the surface.
import React from 'react'
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
import { http, HttpResponse } from 'msw'
import { render, screen, fireEvent, waitFor, within } from '../../../tests/helpers/render'
@@ -1,5 +1,4 @@
// FE-COMP-VCYSHR-001 to FE-COMP-VCYSHR-006
import React from 'react'
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
import { http, HttpResponse } from 'msw'
import { render, screen, fireEvent, waitFor } from '../../../tests/helpers/render'
@@ -1,5 +1,4 @@
// FE-COMP-VCYSTAT-001 to FE-COMP-VCYSTAT-002
import React from 'react'
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest'
import { render, screen } from '../../../tests/helpers/render'
import { resetAllStores } from '../../../tests/helpers/store'
@@ -1,4 +1,4 @@
import React, { useEffect, useCallback, type ReactNode } from 'react'
import { useEffect, useCallback, type ReactNode } from 'react'
import { createPortal } from 'react-dom'
import { AlertTriangle, HelpCircle } from 'lucide-react'
import { useTranslation } from '../../i18n'
@@ -1,4 +1,4 @@
import React, { useEffect, useCallback } from 'react'
import { useEffect, useCallback } from 'react'
import { createPortal } from 'react-dom'
import { Check, X } from 'lucide-react'
import { useTranslation } from '../../i18n'
@@ -1,5 +1,4 @@
// FE-COMP-MATLASPOPUP-001 to FE-COMP-MATLASPOPUP-006
import React from 'react'
import { describe, it, expect, vi, afterEach } from 'vitest'
import { http, HttpResponse } from 'msw'
import { render, screen, fireEvent, waitFor } from '../../../../tests/helpers/render'
@@ -29,7 +29,6 @@
* previous sync, a sync in flight, a failed one, and the version line that
* appears only once a probe actually reported a version.
*/
import React from 'react'
import { describe, it, expect, vi } from 'vitest'
import type { DawarichCapabilities } from '@trek/shared'
import { render, screen, fireEvent } from '../../../../tests/helpers/render'
@@ -5,7 +5,6 @@
// render the page against a mocked useCollections hook (per the Page pattern) and
// assert the Add affordance stays reachable — and that there is exactly one of it.
import { describe, it, expect, vi } from 'vitest'
import React from 'react'
import { render, screen } from '../../tests/helpers/render'
import CollectionsPage from './CollectionsPage'
@@ -3,7 +3,6 @@
// renders, which affordances a role gets, and that every child callback is wired
// to the hook. The page follows the Page pattern, so useCollections is mocked and
// each child is stubbed with a prop-driven button.
import React from 'react'
import { render, screen, fireEvent, cleanup } from '../../tests/helpers/render'
import CollectionsPage from './CollectionsPage'
@@ -1,4 +1,3 @@
import React from 'react';
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
import { http, HttpResponse } from 'msw';
import { render, screen, fireEvent, waitFor, within } from '../../tests/helpers/render';
-1
View File
@@ -1,6 +1,5 @@
// FE-PAGE-JOURNEY-001 to FE-PAGE-JOURNEY-010
import { describe, it, expect, beforeEach, vi } from 'vitest';
import React from 'react';
import { render, screen, waitFor, within } from '../../tests/helpers/render';
import userEvent from '@testing-library/user-event';
import { http, HttpResponse } from 'msw';
@@ -1,6 +1,5 @@
// FE-PAGE-PUBLICJOURNEY-001 to FE-PAGE-PUBLICJOURNEY-023
import { describe, it, expect, beforeEach, vi } from 'vitest';
import React from 'react';
import { render, screen, waitFor, fireEvent, within } from '../../tests/helpers/render';
import { Routes, Route } from 'react-router';
import { http, HttpResponse } from 'msw';
@@ -1,7 +1,6 @@
// FE-PAGE-VCY-001 to FE-PAGE-VCY-007
// Sidebar wiring VacayPage.test.tsx leaves open: year stepping inside the list,
// the shared/school legend rows and the drawer / modal dismissals.
import React from 'react'
import { describe, it, expect, beforeEach, vi } from 'vitest'
import { render, screen, fireEvent, waitFor, within } from '../../tests/helpers/render'
import { resetAllStores, seedStore } from '../../tests/helpers/store'
-1
View File
@@ -1,5 +1,4 @@
import { describe, it, expect, beforeEach, vi } from 'vitest';
import React from 'react';
import { render, screen, waitFor, fireEvent } from '../../tests/helpers/render';
import { resetAllStores, seedStore } from '../../tests/helpers/store';
import { buildUser } from '../../tests/helpers/factories';
@@ -1,6 +1,5 @@
// FE-ADMMTX-001 to FE-ADMMTX-011
import { http, HttpResponse } from 'msw';
import React from 'react';
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
import { server } from '../../../tests/helpers/msw/server';
import { act, fireEvent, render, screen, waitFor } from '../../../tests/helpers/render';
@@ -1,5 +1,4 @@
// FE-ADMBAN-001 to FE-ADMBAN-005
import React from 'react';
import { describe, expect, it, vi } from 'vitest';
import { fireEvent, render, screen } from '../../../tests/helpers/render';
import { useTranslation } from '../../i18n';
@@ -1,5 +1,4 @@
// FE-ADMUSR-001 to FE-ADMUSR-024
import React from 'react';
import { beforeEach, describe, expect, it, vi } from 'vitest';
import { fireEvent, render, screen, within } from '../../../tests/helpers/render';
import { buildAdminHook, buildAdminUser, type AdminHook } from '../../../tests/helpers/mobileAdmin';
+1 -1
View File
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useState, useRef } from 'react'
import { useCallback, useEffect, useLayoutEffect, useMemo, useState, useRef } from 'react'
import { useNavigate } from 'react-router'
import { getLocaleForLanguage, useTranslation } from '../../i18n'
import { useSettingsStore } from '../../store/settingsStore'