Explorar el Código

fix: format eslint-disable comments to be on their own lines

Co-Authored-By: Connor Prussin <connor@dourolabs.xyz>
Devin AI hace 8 meses
padre
commit
711fa486ce

+ 2 - 1
governance/xc_admin/packages/xc_admin_frontend/components/ClusterSwitch.tsx

@@ -10,7 +10,8 @@ const ClusterSwitch = ({ light }: { light?: boolean | null }) => {
 
   const { cluster, setCluster } = useContext(ClusterContext)
   const handleChange = useCallback(
-    (event: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    (event: any) => {
       if (event.target.value) {
         router.query.cluster = event.target.value
         setCluster(event.target.value)

+ 4 - 2
governance/xc_admin/packages/xc_admin_frontend/components/PermissionDepermissionKey.tsx

@@ -57,7 +57,8 @@ const PermissionDepermissionKey = ({
 
   // get current input value
 
-  const handleChange = (event: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const handleChange = (event: any) => {
     setSelectedAssetType(event.target.value)
     setIsModalOpen(true)
   }
@@ -135,7 +136,8 @@ const PermissionDepermissionKey = ({
         toast.success(`Proposal sent! 🚀 Proposal Pubkey: ${proposalPubkey}`)
         setIsSubmitButtonLoading(false)
         closeModal()
-      } catch (error: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      } catch (error: any) {
         if (error.response) {
           toast.error(capitalizeFirstLetter(error.response.data))
         } else {

+ 26 - 17
governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

@@ -78,12 +78,15 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     setIsModalOpen(false)
   }
 
-  const sortData = (data: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
-    const sortedData: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const sortData = (data: any) => {
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const sortedData: any = {}
     Object.keys(data)
       .sort()
       .forEach((key) => {
-        const sortedInnerData: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+        const sortedInnerData: any = {}
         Object.keys(data[key])
           .sort()
           .forEach((innerKey) => {
@@ -99,9 +102,10 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
               )
               // sort price accounts keys
               sortedInnerData[innerKey] = sortedInnerData[innerKey].map(
-                (priceAccount: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
-
-                  const sortedPriceAccount: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
+                // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                (priceAccount: any) => {
+                  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                  const sortedPriceAccount: any = {}
                   Object.keys(priceAccount)
                     .sort()
                     .forEach((priceAccountKey) => {
@@ -167,9 +171,10 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     }
   }, [rawConfig, dataIsLoading, sortDataMemo, cluster])
 
-  const sortObjectByKeys = (obj: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
-    // eslint-disable-line @typescript-eslint/no-explicit-any
-    const sortedObj: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const sortObjectByKeys = (obj: any) => {
+    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    const sortedObj: any = {}
     Object.keys(obj)
       .sort()
       .forEach((key) => {
@@ -253,8 +258,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
   const isValidJson = (json: string) => {
     try {
       JSON.parse(json)
-    } catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
-      // eslint-disable-line @typescript-eslint/no-explicit-any
+      // eslint-disable-next-line @typescript-eslint/no-explicit-any
+    } catch (e: any) {
       toast.error(capitalizeFirstLetter(e.message))
       return false
     }
@@ -641,8 +646,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     })
   }
 
-  const MetadataChangesRows = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
-    // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const MetadataChangesRows = ({ changes }: { changes: any }) => {
     const addPriceFeed = changes.prev === undefined && changes.new !== undefined
     return (
       <>
@@ -674,7 +679,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     )
   }
 
-  const PriceAccountsChangesRows = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const PriceAccountsChangesRows = ({ changes }: { changes: any }) => {
     const addPriceFeed = changes.prev === undefined && changes.new !== undefined
     return (
       <>
@@ -733,7 +739,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     )
   }
 
-  const PublisherKeysChangesRows = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const PublisherKeysChangesRows = ({ changes }: { changes: any }) => {
     const addPriceFeed = changes.prev === undefined && changes.new !== undefined
     const publisherKeysToAdd = addPriceFeed
       ? changes.new
@@ -775,7 +782,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     )
   }
 
-  const NewPriceFeedsRows = ({ priceFeedData }: { priceFeedData: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const NewPriceFeedsRows = ({ priceFeedData }: { priceFeedData: any }) => {
     return (
       <>
         <MetadataChangesRows
@@ -805,7 +813,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
     )
   }
 
-  const ModalContent = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const ModalContent = ({ changes }: { changes: any }) => {
     return (
       <>
         {Object.keys(changes).length > 0 ? (

+ 2 - 1
governance/xc_admin/packages/xc_admin_frontend/components/tabs/Proposals/Proposal.tsx

@@ -300,7 +300,8 @@ export const Proposal = ({
 
         if (refreshData) await refreshData().fetchData()
         toast.success(msg)
-      } catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+      } catch (e: any) {
         toast.error(capitalizeFirstLetter(e.message))
       } finally {
         setIsTransactionLoading(false)

+ 4 - 2
governance/xc_admin/packages/xc_admin_frontend/components/tabs/UpdatePermissions.tsx

@@ -280,7 +280,8 @@ const UpdatePermissions = () => {
                 `Proposal sent! 🚀 Proposal Pubkey: ${proposalPubkey}`
               )
               setIsSendProposalButtonLoading(false)
-            } catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
+              // eslint-disable-next-line @typescript-eslint/no-explicit-any
+            } catch (e: any) {
               toast.error(capitalizeFirstLetter(e.message))
               setIsSendProposalButtonLoading(false)
             }
@@ -289,7 +290,8 @@ const UpdatePermissions = () => {
     }
   }
 
-  const ModalContent = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
+  // eslint-disable-next-line @typescript-eslint/no-explicit-any
+  const ModalContent = ({ changes }: { changes: any }) => {
     return (
       <>
         {Object.keys(changes).length > 0 ? (