-
-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: enable no-constant-binary-expression as it becames recommanded default in new ESLint #15241
Conversation
@@ -99,7 +99,7 @@ export const Pagination = ({ | |||
<PageItem | |||
key={i} | |||
data-testid={`@wallet/accounts/pagination/${i}`} | |||
data-test-activated={i === currentPage ?? 'true'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -77,8 +77,8 @@ export const PortfolioCard = memo(() => { | |||
} | |||
|
|||
const isWalletEmpty = !discoveryStatus && isDeviceEmpty; | |||
const isWalletLoading = discoveryStatus?.status === 'loading' ?? false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here, even if discoveryStatus?.status
is undefined, the === 'loading
turns it into false
and it never fallback to the ??
@@ -48,7 +48,7 @@ export const CoinmarketBalance = ({ | |||
}); | |||
|
|||
if (showOnlyAmount) { | |||
if (!balance ?? isNaN(Number(balance))) return null; | |||
if (balance === undefined || isNaN(Number(balance))) return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed with @adderpositive
4153de3
to
54d80c0
Compare
… default in new ESLint
54d80c0
to
08c97ce
Compare
https://eslint.org/docs/latest/rules/no-constant-binary-expression will became default in recommanded config