chore: set curly eslint rule to multi line (#1322)

* chore: set curly eslint rule to multi line

* chore: fix lint

* chore: make eslint rule error and fix resulting errors
This commit is contained in:
Matthew Russell 2022-09-16 09:04:32 -07:00 committed by GitHub
parent 4aa9bbaa23
commit b8d5680011
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 10 deletions

View File

@ -51,8 +51,7 @@
"ul": ["list"],
"ol": ["list"]
}
],
"curly": "warn"
]
}
},
{
@ -75,7 +74,8 @@
"prefer": "type-imports",
"disallowTypeAnnotations": true
}
]
],
"curly": ["error", "multi-line"]
}
},
{

View File

@ -197,14 +197,16 @@ export const usePollForDelegations = () => {
new BigNumber(a.currentEpochStake || 0).isLessThan(
b.currentEpochStake || 0
)
)
) {
return 1;
}
if (
new BigNumber(a.currentEpochStake || 0).isGreaterThan(
b.currentEpochStake || 0
)
)
) {
return -1;
}
if ((!a.name && b.name) || a.name < b.name) return 1;
if ((!b.name && a.name) || a.name > b.name) return -1;
if (a.nodeId > b.nodeId) return 1;

View File

@ -34,8 +34,9 @@ export class CustomizedBridge extends Eip1193Bridge {
// If from is present on eth_call it errors, removing it makes the library set
// from as the connected wallet which works fine
if (params && params.length && params[0].from && method === 'eth_call')
if (params && params.length && params[0].from && method === 'eth_call') {
delete params[0].from;
}
let result;
// For sending a transaction if we call send it will error
// as it wants gasLimit in sendTransaction but hexlify sets the property gas

View File

@ -50,8 +50,9 @@ export class CustomizedBridge extends Eip1193Bridge {
// If from is present on eth_call it errors, removing it makes the library set
// from as the connected wallet which works fine
if (params && params.length && params[0].from && method === 'eth_call')
if (params && params.length && params[0].from && method === 'eth_call') {
delete params[0].from;
}
let result;
// For sending a transaction if we call send it will error
// as it wants gasLimit in sendTransaction but hexlify sets the property gas

View File

@ -21,8 +21,11 @@ export const MarketsContainer = ({ onSelect }: MarketsContainerProps) => {
onRowClicked={(rowEvent: RowClickedEvent) => {
const { data, event } = rowEvent;
// filters out clicks on the symbol column because it should display asset details
if ((event?.target as HTMLElement).tagName.toUpperCase() === 'BUTTON')
if (
(event?.target as HTMLElement).tagName.toUpperCase() === 'BUTTON'
) {
return;
}
onSelect((data as MarketWithData).id);
}}
/>

View File

@ -49,15 +49,17 @@ export const Web3ConnectDialog = ({
};
function getConnectorInfo(connector: Connector) {
if (connector instanceof MetaMask)
if (connector instanceof MetaMask) {
return {
name: 'MetaMask',
text: t('MetaMask, Brave or other injected web wallet'),
};
if (connector instanceof WalletConnect)
}
if (connector instanceof WalletConnect) {
return {
name: 'WalletConnect',
text: t('WalletConnect'),
};
}
return { name: 'Unknown', text: t('Unknown') };
}