From a874cd64697908dd7296d917aa034f64a8ec6dbd Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Mon, 22 Jul 2024 11:10:10 -0600 Subject: [PATCH] Fix lint issues For some reason, two lint violations show up on my computer when running `yarn lint:eslint`. I have attempted to remove `node_modules`, remove all `dist` directories, remove `.eslintcache`, run `yarn cache clear`, etc. to no avail. I think an ultimate fix here may be to upgrade ESLint packages but that would be a larger change, so as egregious as it is, this commit skirts around the issue by adding some ignore lines. --- packages/accounts-controller/src/AccountsController.ts | 2 ++ packages/assets-controllers/src/NftDetectionController.test.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/accounts-controller/src/AccountsController.ts b/packages/accounts-controller/src/AccountsController.ts index ed4e34632c0..af7714297f8 100644 --- a/packages/accounts-controller/src/AccountsController.ts +++ b/packages/accounts-controller/src/AccountsController.ts @@ -892,6 +892,8 @@ export class AccountsController extends BaseController< const index = Math.max( keyringAccounts.length + 1, + // ESLint is confused; this is a number. + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands lastDefaultIndexUsedForKeyringType + 1, ); diff --git a/packages/assets-controllers/src/NftDetectionController.test.ts b/packages/assets-controllers/src/NftDetectionController.test.ts index 00e9ecf6411..8d550618121 100644 --- a/packages/assets-controllers/src/NftDetectionController.test.ts +++ b/packages/assets-controllers/src/NftDetectionController.test.ts @@ -1411,6 +1411,8 @@ describe('NftDetectionController', () => { it('should not call addNFt when the request to Nft API call throws', async () => { const selectedAccount = createMockInternalAccount({ address: '0x3' }); nock(NFT_API_BASE_URL) + // ESLint is confused; this is a string. + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions .get(`/users/${selectedAccount.address}/tokens`) .query({ continuation: '',