Add custom eslint rule

Adding a custom Radicle ESLint rule to enforce one (1) space
after a unary logical NOT (`!`)

Signed-off-by: Sebastian Martinez <sebastinez@me.com>
This commit is contained in:
Sebastian Martinez
2022-02-28 13:57:42 +01:00
committed by Alexis Sellier
parent 582ca41e5e
commit 55bf46729b
6 changed files with 21 additions and 5 deletions
+2 -2
View File
@@ -161,7 +161,7 @@ export function parseEnsLabel(name: string, config: Config): string {
export function clickOutside(node: HTMLElement, onEventFunction: () => void): any {
const handleClick = (event: any) => {
const path = event.composedPath();
if (!path.includes(node)) {
if (! path.includes(node)) {
onEventFunction();
}
};
@@ -419,7 +419,7 @@ export async function getTokens(address: string, config: Config): Promise<Array<
const balances = userBalances.tokenBalances.filter((token: any) => {
// alchemy_getTokenBalances sometimes returns 0x and this does not work well with ethers.BigNumber
if (token.tokenBalance !== "0x") {
if (!BigNumber.from(token.tokenBalance).isZero()) {
if (! BigNumber.from(token.tokenBalance).isZero()) {
return token;
}
}