Skip to content

Commit

Permalink
chore: enable no-constant-binary-expression as it becames recommanded…
Browse files Browse the repository at this point in the history
… default in new ESLint
  • Loading branch information
peter-sanderson committed Nov 7, 2024
1 parent 556c7c0 commit 5e33e3a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ module.exports = {
rules: {
'no-extra-boolean-cast': 'error',
'no-irregular-whitespace': 'error',
'no-constant-binary-expression': 'error',
'no-empty': 'error',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-require-imports': 'off',
Expand Down
1 change: 1 addition & 0 deletions packages/connect-popup/e2e/tests/methods.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ filteredFixtures.forEach(f => {
// - fixture require different device than prev fixture, or
// - fixture is retried
// FIXME: always reset for now, due to flaky tests with bridge bug
// eslint-disable-next-line no-constant-binary-expression
if (true || JSON.stringify(device) !== JSON.stringify(f.device) || retry) {
device = f.device;
await TrezorUserEnvLink.stopBridge();
Expand Down
2 changes: 1 addition & 1 deletion packages/suite/src/components/wallet/Pagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const Pagination = ({
<PageItem
key={i}
data-testid={`@wallet/accounts/pagination/${i}`}
data-test-activated={i === currentPage ?? 'true'}
data-test-activated={i === currentPage}
onClick={() => onPageSelected(i)}
$isActive={i === currentPage}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export const PortfolioCard = memo(() => {
}

const isWalletEmpty = !discoveryStatus && isDeviceEmpty;
const isWalletLoading = discoveryStatus?.status === 'loading' ?? false;
const isWalletError = discoveryStatus?.status === 'exception' ?? false;
const isWalletLoading = discoveryStatus?.status === 'loading';
const isWalletError = discoveryStatus?.status === 'exception';
const showGraphControls =
!isWalletEmpty && !isWalletLoading && !isWalletError && !dashboardGraphHidden;

Expand Down

0 comments on commit 5e33e3a

Please sign in to comment.