Skip to content

Commit 711fa48

Browse files
fix: format eslint-disable comments to be on their own lines
Co-Authored-By: Connor Prussin <[email protected]>
1 parent 83af1b9 commit 711fa48

File tree

5 files changed

+38
-23
lines changed

5 files changed

+38
-23
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/ClusterSwitch.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ const ClusterSwitch = ({ light }: { light?: boolean | null }) => {
1010

1111
const { cluster, setCluster } = useContext(ClusterContext)
1212
const handleChange = useCallback(
13-
(event: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
13+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
14+
(event: any) => {
1415
if (event.target.value) {
1516
router.query.cluster = event.target.value
1617
setCluster(event.target.value)

governance/xc_admin/packages/xc_admin_frontend/components/PermissionDepermissionKey.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ const PermissionDepermissionKey = ({
5757

5858
// get current input value
5959

60-
const handleChange = (event: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
60+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
61+
const handleChange = (event: any) => {
6162
setSelectedAssetType(event.target.value)
6263
setIsModalOpen(true)
6364
}
@@ -135,7 +136,8 @@ const PermissionDepermissionKey = ({
135136
toast.success(`Proposal sent! 🚀 Proposal Pubkey: ${proposalPubkey}`)
136137
setIsSubmitButtonLoading(false)
137138
closeModal()
138-
} catch (error: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
139+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
140+
} catch (error: any) {
139141
if (error.response) {
140142
toast.error(capitalizeFirstLetter(error.response.data))
141143
} else {

governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,15 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
7878
setIsModalOpen(false)
7979
}
8080

81-
const sortData = (data: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
82-
const sortedData: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
81+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
82+
const sortData = (data: any) => {
83+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
84+
const sortedData: any = {}
8385
Object.keys(data)
8486
.sort()
8587
.forEach((key) => {
86-
const sortedInnerData: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
88+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
89+
const sortedInnerData: any = {}
8790
Object.keys(data[key])
8891
.sort()
8992
.forEach((innerKey) => {
@@ -99,9 +102,10 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
99102
)
100103
// sort price accounts keys
101104
sortedInnerData[innerKey] = sortedInnerData[innerKey].map(
102-
(priceAccount: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
103-
104-
const sortedPriceAccount: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
105+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
106+
(priceAccount: any) => {
107+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
108+
const sortedPriceAccount: any = {}
105109
Object.keys(priceAccount)
106110
.sort()
107111
.forEach((priceAccountKey) => {
@@ -167,9 +171,10 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
167171
}
168172
}, [rawConfig, dataIsLoading, sortDataMemo, cluster])
169173

170-
const sortObjectByKeys = (obj: any) => { // eslint-disable-line @typescript-eslint/no-explicit-any
171-
// eslint-disable-line @typescript-eslint/no-explicit-any
172-
const sortedObj: any = {} // eslint-disable-line @typescript-eslint/no-explicit-any
174+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
175+
const sortObjectByKeys = (obj: any) => {
176+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
177+
const sortedObj: any = {}
173178
Object.keys(obj)
174179
.sort()
175180
.forEach((key) => {
@@ -253,8 +258,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
253258
const isValidJson = (json: string) => {
254259
try {
255260
JSON.parse(json)
256-
} catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
257-
// eslint-disable-line @typescript-eslint/no-explicit-any
261+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
262+
} catch (e: any) {
258263
toast.error(capitalizeFirstLetter(e.message))
259264
return false
260265
}
@@ -641,8 +646,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
641646
})
642647
}
643648

644-
const MetadataChangesRows = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
645-
// eslint-disable-line @typescript-eslint/no-explicit-any
649+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
650+
const MetadataChangesRows = ({ changes }: { changes: any }) => {
646651
const addPriceFeed = changes.prev === undefined && changes.new !== undefined
647652
return (
648653
<>
@@ -674,7 +679,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
674679
)
675680
}
676681

677-
const PriceAccountsChangesRows = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
682+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
683+
const PriceAccountsChangesRows = ({ changes }: { changes: any }) => {
678684
const addPriceFeed = changes.prev === undefined && changes.new !== undefined
679685
return (
680686
<>
@@ -733,7 +739,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
733739
)
734740
}
735741

736-
const PublisherKeysChangesRows = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
742+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
743+
const PublisherKeysChangesRows = ({ changes }: { changes: any }) => {
737744
const addPriceFeed = changes.prev === undefined && changes.new !== undefined
738745
const publisherKeysToAdd = addPriceFeed
739746
? changes.new
@@ -775,7 +782,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
775782
)
776783
}
777784

778-
const NewPriceFeedsRows = ({ priceFeedData }: { priceFeedData: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
785+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
786+
const NewPriceFeedsRows = ({ priceFeedData }: { priceFeedData: any }) => {
779787
return (
780788
<>
781789
<MetadataChangesRows
@@ -805,7 +813,8 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
805813
)
806814
}
807815

808-
const ModalContent = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
816+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
817+
const ModalContent = ({ changes }: { changes: any }) => {
809818
return (
810819
<>
811820
{Object.keys(changes).length > 0 ? (

governance/xc_admin/packages/xc_admin_frontend/components/tabs/Proposals/Proposal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ export const Proposal = ({
300300

301301
if (refreshData) await refreshData().fetchData()
302302
toast.success(msg)
303-
} catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
303+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
304+
} catch (e: any) {
304305
toast.error(capitalizeFirstLetter(e.message))
305306
} finally {
306307
setIsTransactionLoading(false)

governance/xc_admin/packages/xc_admin_frontend/components/tabs/UpdatePermissions.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,8 @@ const UpdatePermissions = () => {
280280
`Proposal sent! 🚀 Proposal Pubkey: ${proposalPubkey}`
281281
)
282282
setIsSendProposalButtonLoading(false)
283-
} catch (e: any) { // eslint-disable-line @typescript-eslint/no-explicit-any
283+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
284+
} catch (e: any) {
284285
toast.error(capitalizeFirstLetter(e.message))
285286
setIsSendProposalButtonLoading(false)
286287
}
@@ -289,7 +290,8 @@ const UpdatePermissions = () => {
289290
}
290291
}
291292

292-
const ModalContent = ({ changes }: { changes: any }) => { // eslint-disable-line @typescript-eslint/no-explicit-any
293+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
294+
const ModalContent = ({ changes }: { changes: any }) => {
293295
return (
294296
<>
295297
{Object.keys(changes).length > 0 ? (

0 commit comments

Comments
 (0)