From 13cae940a6982b23408d1c09ba7320a448d0878e Mon Sep 17 00:00:00 2001 From: SeanCassiere <33615041+SeanCassiere@users.noreply.github.com> Date: Fri, 2 Aug 2024 16:45:10 +1200 Subject: [PATCH] style: disable the "react/react-in-jsx-scope" rule --- eslint.config.mjs | 3 ++- src/components/primary-module/information-block/common.tsx | 1 - .../primary-module/statistic-block/agreement-stat-block.tsx | 1 - .../primary-module/statistic-block/vehicle-stat-block.tsx | 1 - src/components/ui/skeleton.tsx | 2 -- src/routes/-components/auth/header/index.tsx | 1 - .../-components/auth/header/user-navigation-dropdown.tsx | 1 - .../(customers)/customers.$customerId._details.summary.tsx | 1 - src/routes/_auth/(customers)/customers.new.tsx | 1 - .../(dashboard)/-components/widget-grid/widgets/_common.tsx | 1 - src/routes/_auth/(fleet)/fleet.$vehicleId._details.notes.tsx | 1 - src/routes/_auth/(fleet)/fleet.$vehicleId.edit.tsx | 1 - src/routes/_auth/(fleet)/fleet.new.tsx | 1 - .../_auth/(reports)/-components/view-report/page-filter.tsx | 1 - .../reservations.$reservationId._details.summary.tsx | 1 - .../-components/application/user-reset-password-dialog.tsx | 1 - src/routes/_auth/(settings)/-components/sidebar-navigation.tsx | 1 - .../settings.application.store-hours-and-holidays.tsx | 1 - src/routes/_auth/(settings)/settings.rates-and-charges.tsx | 1 - src/routes/_auth/(settings)/settings.runtime-configuration.tsx | 1 - .../_auth/(settings)/settings.vehicles-and-categories.tsx | 1 - src/routes/_public/logout.tsx | 1 - src/routes/_public/oidc-callback.tsx | 1 - 23 files changed, 2 insertions(+), 24 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 8074e45e..0805d5fc 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -68,8 +68,9 @@ export default tseslint.config( "no-extra-boolean-cast": "off", "no-case-declarations": "off", - "react/prop-types": "off", "react/display-name": "off", + "react/prop-types": "off", + "react/react-in-jsx-scope": "off", "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/consistent-type-imports": "error", diff --git a/src/components/primary-module/information-block/common.tsx b/src/components/primary-module/information-block/common.tsx index 46c006aa..4a453d3e 100644 --- a/src/components/primary-module/information-block/common.tsx +++ b/src/components/primary-module/information-block/common.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { type ReactNode } from "react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; diff --git a/src/components/primary-module/statistic-block/agreement-stat-block.tsx b/src/components/primary-module/statistic-block/agreement-stat-block.tsx index feb9401b..6e8ec455 100644 --- a/src/components/primary-module/statistic-block/agreement-stat-block.tsx +++ b/src/components/primary-module/statistic-block/agreement-stat-block.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useTranslation } from "react-i18next"; import { type AgreementDataParsed } from "../../../lib/schemas/agreement"; diff --git a/src/components/primary-module/statistic-block/vehicle-stat-block.tsx b/src/components/primary-module/statistic-block/vehicle-stat-block.tsx index 86e7a10f..2fea5433 100644 --- a/src/components/primary-module/statistic-block/vehicle-stat-block.tsx +++ b/src/components/primary-module/statistic-block/vehicle-stat-block.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useQuery } from "@tanstack/react-query"; import type { VehicleDataParsed } from "@/lib/schemas/vehicle"; diff --git a/src/components/ui/skeleton.tsx b/src/components/ui/skeleton.tsx index 632ece58..2cdf440d 100644 --- a/src/components/ui/skeleton.tsx +++ b/src/components/ui/skeleton.tsx @@ -1,5 +1,3 @@ -import * as React from "react"; - import { cn } from "@/lib/utils"; function Skeleton({ diff --git a/src/routes/-components/auth/header/index.tsx b/src/routes/-components/auth/header/index.tsx index 3a73d8f2..b5f0c133 100644 --- a/src/routes/-components/auth/header/index.tsx +++ b/src/routes/-components/auth/header/index.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; import { useAuth } from "react-oidc-context"; diff --git a/src/routes/-components/auth/header/user-navigation-dropdown.tsx b/src/routes/-components/auth/header/user-navigation-dropdown.tsx index c594cda6..3259cfec 100644 --- a/src/routes/-components/auth/header/user-navigation-dropdown.tsx +++ b/src/routes/-components/auth/header/user-navigation-dropdown.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useQuery } from "@tanstack/react-query"; import { Link } from "@tanstack/react-router"; import { useAuth } from "react-oidc-context"; diff --git a/src/routes/_auth/(customers)/customers.$customerId._details.summary.tsx b/src/routes/_auth/(customers)/customers.$customerId._details.summary.tsx index 5341b19b..ebd7f6e4 100644 --- a/src/routes/_auth/(customers)/customers.$customerId._details.summary.tsx +++ b/src/routes/_auth/(customers)/customers.$customerId._details.summary.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useSuspenseQuery } from "@tanstack/react-query"; import { createFileRoute } from "@tanstack/react-router"; diff --git a/src/routes/_auth/(customers)/customers.new.tsx b/src/routes/_auth/(customers)/customers.new.tsx index 30eb916c..8f867464 100644 --- a/src/routes/_auth/(customers)/customers.new.tsx +++ b/src/routes/_auth/(customers)/customers.new.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute } from "@tanstack/react-router"; import { Container } from "@/routes/-components/container"; diff --git a/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/_common.tsx b/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/_common.tsx index 689e18fb..f51727b0 100644 --- a/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/_common.tsx +++ b/src/routes/_auth/(dashboard)/-components/widget-grid/widgets/_common.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import type { DraggableAttributes, DraggableSyntheticListeners, diff --git a/src/routes/_auth/(fleet)/fleet.$vehicleId._details.notes.tsx b/src/routes/_auth/(fleet)/fleet.$vehicleId._details.notes.tsx index 056463d5..5a1d3b5f 100644 --- a/src/routes/_auth/(fleet)/fleet.$vehicleId._details.notes.tsx +++ b/src/routes/_auth/(fleet)/fleet.$vehicleId._details.notes.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute } from "@tanstack/react-router"; import ModuleNotesTabContent from "@/components/primary-module/tabs/notes-content"; diff --git a/src/routes/_auth/(fleet)/fleet.$vehicleId.edit.tsx b/src/routes/_auth/(fleet)/fleet.$vehicleId.edit.tsx index 55df1981..f1bb8e40 100644 --- a/src/routes/_auth/(fleet)/fleet.$vehicleId.edit.tsx +++ b/src/routes/_auth/(fleet)/fleet.$vehicleId.edit.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute } from "@tanstack/react-router"; import { Container } from "@/routes/-components/container"; diff --git a/src/routes/_auth/(fleet)/fleet.new.tsx b/src/routes/_auth/(fleet)/fleet.new.tsx index f151d96e..fb52fc44 100644 --- a/src/routes/_auth/(fleet)/fleet.new.tsx +++ b/src/routes/_auth/(fleet)/fleet.new.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute } from "@tanstack/react-router"; import { Container } from "@/routes/-components/container"; diff --git a/src/routes/_auth/(reports)/-components/view-report/page-filter.tsx b/src/routes/_auth/(reports)/-components/view-report/page-filter.tsx index 5147961e..530872a8 100644 --- a/src/routes/_auth/(reports)/-components/view-report/page-filter.tsx +++ b/src/routes/_auth/(reports)/-components/view-report/page-filter.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useTranslation } from "react-i18next"; import { Badge } from "@/components/ui/badge"; diff --git a/src/routes/_auth/(reservations)/reservations.$reservationId._details.summary.tsx b/src/routes/_auth/(reservations)/reservations.$reservationId._details.summary.tsx index 2ac8a9ff..b78e296a 100644 --- a/src/routes/_auth/(reservations)/reservations.$reservationId._details.summary.tsx +++ b/src/routes/_auth/(reservations)/reservations.$reservationId._details.summary.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useSuspenseQuery } from "@tanstack/react-query"; import { createFileRoute } from "@tanstack/react-router"; diff --git a/src/routes/_auth/(settings)/-components/application/user-reset-password-dialog.tsx b/src/routes/_auth/(settings)/-components/application/user-reset-password-dialog.tsx index 27e4f31b..20e83fa9 100644 --- a/src/routes/_auth/(settings)/-components/application/user-reset-password-dialog.tsx +++ b/src/routes/_auth/(settings)/-components/application/user-reset-password-dialog.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { useMutation } from "@tanstack/react-query"; import { useTranslation } from "react-i18next"; import { toast } from "sonner"; diff --git a/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx b/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx index 12a4c874..f162ada5 100644 --- a/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx +++ b/src/routes/_auth/(settings)/-components/sidebar-navigation.tsx @@ -1,4 +1,3 @@ -import React from "react"; import type { AnyRouter, LinkOptions, diff --git a/src/routes/_auth/(settings)/settings.application.store-hours-and-holidays.tsx b/src/routes/_auth/(settings)/settings.application.store-hours-and-holidays.tsx index 6fe9446a..9ab651b0 100644 --- a/src/routes/_auth/(settings)/settings.application.store-hours-and-holidays.tsx +++ b/src/routes/_auth/(settings)/settings.application.store-hours-and-holidays.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute, Link } from "@tanstack/react-router"; import { useTranslation } from "react-i18next"; diff --git a/src/routes/_auth/(settings)/settings.rates-and-charges.tsx b/src/routes/_auth/(settings)/settings.rates-and-charges.tsx index 6f58a605..de6781f6 100644 --- a/src/routes/_auth/(settings)/settings.rates-and-charges.tsx +++ b/src/routes/_auth/(settings)/settings.rates-and-charges.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute, redirect } from "@tanstack/react-router"; export const Route = createFileRoute( diff --git a/src/routes/_auth/(settings)/settings.runtime-configuration.tsx b/src/routes/_auth/(settings)/settings.runtime-configuration.tsx index c79fdba5..e729327d 100644 --- a/src/routes/_auth/(settings)/settings.runtime-configuration.tsx +++ b/src/routes/_auth/(settings)/settings.runtime-configuration.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute, redirect } from "@tanstack/react-router"; export const Route = createFileRoute( diff --git a/src/routes/_auth/(settings)/settings.vehicles-and-categories.tsx b/src/routes/_auth/(settings)/settings.vehicles-and-categories.tsx index 3be4e087..e7f62c29 100644 --- a/src/routes/_auth/(settings)/settings.vehicles-and-categories.tsx +++ b/src/routes/_auth/(settings)/settings.vehicles-and-categories.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute, redirect } from "@tanstack/react-router"; export const Route = createFileRoute( diff --git a/src/routes/_public/logout.tsx b/src/routes/_public/logout.tsx index 448ea867..9a4adf39 100644 --- a/src/routes/_public/logout.tsx +++ b/src/routes/_public/logout.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute, redirect } from "@tanstack/react-router"; import { Container } from "@/routes/-components/container"; diff --git a/src/routes/_public/oidc-callback.tsx b/src/routes/_public/oidc-callback.tsx index dbeebb14..220178d6 100644 --- a/src/routes/_public/oidc-callback.tsx +++ b/src/routes/_public/oidc-callback.tsx @@ -1,4 +1,3 @@ -import * as React from "react"; import { createFileRoute, redirect } from "@tanstack/react-router"; import { hasAuthParams } from "react-oidc-context"; import { z } from "zod";