From 6ce307b0a2ad64e123ea5ee3581f52335d23a57f Mon Sep 17 00:00:00 2001 From: Kishore <42832651+kishore03109@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:00:27 +0800 Subject: [PATCH 1/2] chore(eslint): turn off warning --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 05b7ab852..54f759125 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -42,7 +42,7 @@ "rules": { "no-shadow": "off", "@typescript-eslint/no-shadow": "error", - "react/jsx-props-no-spreading": "warn", + "react/jsx-props-no-spreading": "off", "react/require-default-props": "off", "import/prefer-default-export": "off", "react/prop-types": "warn", From d8cbca3ca39331ca8693f20d702b084ab296c847 Mon Sep 17 00:00:00 2001 From: Kishore <42832651+kishore03109@users.noreply.github.com> Date: Wed, 28 Jun 2023 16:05:42 +0800 Subject: [PATCH 2/2] chore(eslint): remove redundant warnings --- src/assets/icons/BxCopy.tsx | 1 - src/assets/icons/BxLifeBuoy.tsx | 1 - src/assets/icons/BxsClearRocket.tsx | 1 - src/components/Card/Card.tsx | 1 - src/components/DisplayCard/DisplayCard.tsx | 1 - src/components/MediaSettingsModal/MediaSettingsModal.jsx | 1 - src/components/PageSettingsModal/PageSettingsModal.tsx | 3 --- .../PageSettingsModal/ResourcePageSettingsModal.tsx | 5 ----- src/components/contact-us/Section.jsx | 1 - src/components/folders/ReorderingModal.jsx | 3 --- src/components/homepage/HeroDropdown.jsx | 1 - src/components/homepage/HeroSection.jsx | 1 - src/components/media/MediaAltText.jsx | 1 - src/components/navbar/NavSection.jsx | 1 - src/components/navbar/NavSublinkSection.jsx | 1 - src/layouts/EditContactUs.jsx | 1 - src/layouts/EditHomepage.jsx | 1 - src/layouts/ResourceRoom/ResourceRoom.tsx | 2 -- src/layouts/SiteLaunchPad/SiteLaunchPad.tsx | 1 - .../SiteLaunchPad/components/SiteLaunchCheckList.tsx | 1 - .../SiteLaunchPad/components/SiteLaunchInfoGathering.tsx | 1 - src/layouts/components/CreateButton.tsx | 1 - src/layouts/components/Section/Section.tsx | 1 - src/layouts/components/Section/SectionCaption.tsx | 1 - src/layouts/layouts/SiteEditLayout/SiteEditLayout.tsx | 2 -- src/layouts/layouts/SiteViewLayout/SiteViewLayout.tsx | 2 -- src/routing/ProtectedRoute.tsx | 6 +----- src/routing/ProtectedRouteWithProps.tsx | 1 - src/routing/RedirectIfLoggedInRoute.jsx | 1 - 29 files changed, 1 insertion(+), 44 deletions(-) diff --git a/src/assets/icons/BxCopy.tsx b/src/assets/icons/BxCopy.tsx index 1a7366d60..2756f2b80 100644 --- a/src/assets/icons/BxCopy.tsx +++ b/src/assets/icons/BxCopy.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ export const BxCopy = (props: React.SVGProps): JSX.Element => { return ( ): JSX.Element => { diff --git a/src/assets/icons/BxsClearRocket.tsx b/src/assets/icons/BxsClearRocket.tsx index ce9294ae1..a4a942cb2 100644 --- a/src/assets/icons/BxsClearRocket.tsx +++ b/src/assets/icons/BxsClearRocket.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ export const BxsClearRocket = ( props: React.SVGProps ): JSX.Element => { diff --git a/src/components/Card/Card.tsx b/src/components/Card/Card.tsx index 366fc36b2..26befaa8a 100644 --- a/src/components/Card/Card.tsx +++ b/src/components/Card/Card.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import { Box, BoxProps, diff --git a/src/components/DisplayCard/DisplayCard.tsx b/src/components/DisplayCard/DisplayCard.tsx index fdd7b2f67..c5d1e3ef0 100644 --- a/src/components/DisplayCard/DisplayCard.tsx +++ b/src/components/DisplayCard/DisplayCard.tsx @@ -1,4 +1,3 @@ -/* eslint-disable react/jsx-props-no-spreading */ import { Box, Divider, diff --git a/src/components/MediaSettingsModal/MediaSettingsModal.jsx b/src/components/MediaSettingsModal/MediaSettingsModal.jsx index c99b5172d..52da16623 100644 --- a/src/components/MediaSettingsModal/MediaSettingsModal.jsx +++ b/src/components/MediaSettingsModal/MediaSettingsModal.jsx @@ -158,7 +158,6 @@ export const MediaSettingsModal = ({ File name diff --git a/src/components/PageSettingsModal/PageSettingsModal.tsx b/src/components/PageSettingsModal/PageSettingsModal.tsx index de7ba976c..0b1d708ae 100644 --- a/src/components/PageSettingsModal/PageSettingsModal.tsx +++ b/src/components/PageSettingsModal/PageSettingsModal.tsx @@ -158,7 +158,6 @@ export const PageSettingsModal = ({ {errors.title?.message} @@ -173,7 +172,6 @@ export const PageSettingsModal = ({ diff --git a/src/components/PageSettingsModal/ResourcePageSettingsModal.tsx b/src/components/PageSettingsModal/ResourcePageSettingsModal.tsx index 5fd29ab80..957bed467 100644 --- a/src/components/PageSettingsModal/ResourcePageSettingsModal.tsx +++ b/src/components/PageSettingsModal/ResourcePageSettingsModal.tsx @@ -250,7 +250,6 @@ export const ResourcePageSettingsModal = ({ Resource Type {errors.title?.message} @@ -289,7 +287,6 @@ export const ResourcePageSettingsModal = ({
{
{dirOrder.map((folderContentItem, folderContentIndex) => ( @@ -102,9 +101,7 @@ const ReorderingModal = ({ params, dirData, onProceed, onClose }) => { > {(draggableProvided) => (
diff --git a/src/components/homepage/HeroDropdown.jsx b/src/components/homepage/HeroDropdown.jsx index 715cc5fce..3bf78a1a4 100644 --- a/src/components/homepage/HeroDropdown.jsx +++ b/src/components/homepage/HeroDropdown.jsx @@ -101,7 +101,6 @@ const HeroDropdown = ({ {(droppableProvided) => ( - /* eslint-disable react/jsx-props-no-spreading */
{(droppableProvided) => ( - /* eslint-disable react/jsx-props-no-spreading */
{ */} diff --git a/src/components/navbar/NavSection.jsx b/src/components/navbar/NavSection.jsx index eb5ec3967..61e80de08 100644 --- a/src/components/navbar/NavSection.jsx +++ b/src/components/navbar/NavSection.jsx @@ -218,7 +218,6 @@ const NavSection = ({ <> {(droppableProvided) => ( - /* eslint-disable react/jsx-props-no-spreading */
( {(droppableProvided) => ( - /* eslint-disable react/jsx-props-no-spreading */
{ Resource room title ( return (