diff --git a/packages/dlog/src/dlog.ts b/packages/dlog/src/dlog.ts index 0a1cd9528..b2dea96c9 100644 --- a/packages/dlog/src/dlog.ts +++ b/packages/dlog/src/dlog.ts @@ -144,7 +144,6 @@ const isDev = typeof process !== 'undefined' && process.env.NODE_ENV === 'develo const makeDlog = (d: Debugger, opts?: DLogOpts): DLogger => { if (opts?.printStack) { - // eslint-disable-next-line no-console d.log = console.error.bind(console) } diff --git a/packages/encryption/src/encryptionDevice.ts b/packages/encryption/src/encryptionDevice.ts index d23ee3028..3120d3bc5 100644 --- a/packages/encryption/src/encryptionDevice.ts +++ b/packages/encryption/src/encryptionDevice.ts @@ -1,6 +1,4 @@ // todo: fix lint issues and remove exception see: https://linear.app/hnt-labs/issue/HNT-1721/address-linter-overrides-in-matrix-encryption-code-from-sdk -/* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unused-vars, @typescript-eslint/no-unsafe-argument*/ - import { CryptoStore } from './cryptoStore' import { Account, @@ -124,9 +122,11 @@ export class EncryptionDevice { account.free() } + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.deviceCurve25519Key = e2eKeys.curve25519 // note jterzis 07/19/23: deprecating ed25519 key in favor of TDK // see: https://linear.app/hnt-labs/issue/HNT-1796/tdk-signature-storage-curve25519-key + // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access this.deviceDoNotUseKey = e2eKeys.ed25519 log( `init: deviceCurve25519Key: ${this.deviceCurve25519Key}, fallbackKey ${JSON.stringify( @@ -347,9 +347,7 @@ export class EncryptionDevice { * @param func - Invoked with the unpickled session * @returns result of func */ - private unpickleInboundGroupSession( - sessionData: InboundGroupSessionData, - ): InboundGroupSession { + private unpickleInboundGroupSession(sessionData: InboundGroupSessionData): InboundGroupSession { const session = this.delegate.createInboundGroupSession() session.unpickle(this.pickleKey, sessionData.session) return session diff --git a/packages/encryption/src/tests/encryption-protocol.test.ts b/packages/encryption/src/tests/encryption-protocol.test.ts index 974033b37..8e0dd852e 100644 --- a/packages/encryption/src/tests/encryption-protocol.test.ts +++ b/packages/encryption/src/tests/encryption-protocol.test.ts @@ -101,7 +101,6 @@ describe('Encryption Protocol', () => { const bobFallbackKey = JSON.parse(bobAccount.unpublished_fallback_key()).curve25519 log('bobFallbackKeys', bobFallbackKey) - // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access const bobIdKey = JSON.parse(bobAccount?.identity_keys()).curve25519 const otkId = Object.keys(bobFallbackKey)[0] // create outbound sessions using bob's fallback key diff --git a/packages/sdk/src/channelsWithEntitlements.test.ts b/packages/sdk/src/channelsWithEntitlements.test.ts index b854daa59..9a74acc4d 100644 --- a/packages/sdk/src/channelsWithEntitlements.test.ts +++ b/packages/sdk/src/channelsWithEntitlements.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ /** * @group with-entitilements */ @@ -163,10 +162,10 @@ async function expectUserCanJoinChannel( ).resolves.toBeTruthy() // Stream node should allow the join - await expect(client.joinStream(channelId!)).toResolve() + await expect(client.joinStream(channelId)).toResolve() const aliceUserStreamView = (await client.waitForStream(makeUserStreamId(client.userId))!).view // Wait for alice's user stream to have the join - await waitFor(() => aliceUserStreamView.userContent.isMember(channelId!, MembershipOp.SO_JOIN)) + await waitFor(() => aliceUserStreamView.userContent.isMember(channelId, MembershipOp.SO_JOIN)) } async function expectUserCannotJoinChannel( @@ -498,7 +497,7 @@ describe('channelsWithEntitlements', () => { carolProvider, spaceId, channelId, - } = await setupChannelWithCustomRole([], getNftRuleData(testNft1Address as Address)) + } = await setupChannelWithCustomRole([], getNftRuleData(testNft1Address)) // Link carol's wallet to alice's as root await linkWallets(aliceSpaceDapp, aliceProvider.wallet, carolProvider.wallet) @@ -535,7 +534,7 @@ describe('channelsWithEntitlements', () => { carolProvider, spaceId, channelId, - } = await setupChannelWithCustomRole([], getNftRuleData(testNft1Address as Address)) + } = await setupChannelWithCustomRole([], getNftRuleData(testNft1Address)) log("Joining alice's wallet as a linked wallet to carols root wallet") await linkWallets(carolSpaceDapp, carolProvider.wallet, aliceProvider.wallet) @@ -677,7 +676,7 @@ describe('channelsWithEntitlements', () => { const testNft1Address = await getContractAddress('TestNFT1') const { alice, aliceSpaceDapp, bob, spaceId, channelId } = await setupChannelWithCustomRole( [], - getNftRuleData(testNft1Address as Address), + getNftRuleData(testNft1Address), ) // Alice has no NFTs, so she should not be able to join the channel @@ -793,7 +792,7 @@ describe('channelsWithEntitlements', () => { opType: OperationType.CHECK, checkType: CheckOperationType.ERC721, chainId: 31337n, - contractAddress: testNft1Address as Address, + contractAddress: testNft1Address, threshold: 1n, } @@ -801,7 +800,7 @@ describe('channelsWithEntitlements', () => { opType: OperationType.CHECK, checkType: CheckOperationType.ERC721, chainId: 31337n, - contractAddress: testNft2Address as Address, + contractAddress: testNft2Address, threshold: 1n, } const two: Operation = { @@ -819,7 +818,7 @@ describe('channelsWithEntitlements', () => { opType: OperationType.CHECK, checkType: CheckOperationType.ERC721, chainId: 31337n, - contractAddress: testNft3Address as Address, + contractAddress: testNft3Address, threshold: 1n, }, } diff --git a/packages/sdk/src/client.test.ts b/packages/sdk/src/client.test.ts index 9fd4176fa..bbac54b7b 100644 --- a/packages/sdk/src/client.test.ts +++ b/packages/sdk/src/client.test.ts @@ -33,8 +33,6 @@ import { } from '@river-build/proto' import { PartialMessage } from '@bufbuild/protobuf' import { CallOptions } from '@connectrpc/connect' -// This is needed to get the jest itnerface for using in spyOn -// eslint-disable-next-line import/no-extraneous-dependencies import { jest } from '@jest/globals' import { DecryptedTimelineEvent, diff --git a/packages/sdk/src/mediaWithEntitlements.test.ts b/packages/sdk/src/mediaWithEntitlements.test.ts index b9d307354..0a8d4900f 100644 --- a/packages/sdk/src/mediaWithEntitlements.test.ts +++ b/packages/sdk/src/mediaWithEntitlements.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ /** * @group with-entitilements */ diff --git a/packages/sdk/src/membershipManagement.test.ts b/packages/sdk/src/membershipManagement.test.ts index b29c8c133..90c1a0de7 100644 --- a/packages/sdk/src/membershipManagement.test.ts +++ b/packages/sdk/src/membershipManagement.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ /** * @group with-entitilements */ diff --git a/packages/sdk/src/persistenceStore.ts b/packages/sdk/src/persistenceStore.ts index bef68e579..5ad0b8846 100644 --- a/packages/sdk/src/persistenceStore.ts +++ b/packages/sdk/src/persistenceStore.ts @@ -236,43 +236,36 @@ export class PersistenceStore extends Dexie implements IPersistenceStore { } //Linting below is disable as this is a stub class which is used for testing and just follows the interface +/* eslint-disable @typescript-eslint/no-unused-vars */ export class StubPersistenceStore implements IPersistenceStore { - //eslint-disable-next-line @typescript-eslint/no-unused-vars async saveCleartext(eventId: string, cleartext: string) { return Promise.resolve() } - //eslint-disable-next-line @typescript-eslint/no-unused-vars async getCleartext(eventId: string) { return Promise.resolve(undefined) } - //eslint-disable-next-line @typescript-eslint/no-unused-vars async getCleartexts(eventIds: string[]) { return Promise.resolve(undefined) } - //eslint-disable-next-line @typescript-eslint/no-unused-vars async getSyncedStream(streamId: string) { return Promise.resolve(undefined) } - //eslint-disable-next-line @typescript-eslint/no-unused-vars async saveSyncedStream(streamId: string, syncedStream: PersistedSyncedStream) { return Promise.resolve() } - //eslint-disable-next-line @typescript-eslint/no-unused-vars async saveMiniblock(streamId: string, miniblock: ParsedMiniblock) { return Promise.resolve() } - //eslint-disable-next-line @typescript-eslint/no-unused-vars async saveMiniblocks(streamId: string, miniblocks: ParsedMiniblock[]) { return Promise.resolve() } - /* eslint-disable @typescript-eslint/no-unused-vars */ async getMiniblock( streamId: string, miniblockNum: bigint, diff --git a/packages/sdk/src/spaceWithEntitlements.test.ts b/packages/sdk/src/spaceWithEntitlements.test.ts index 0bd9afb52..6bc66678e 100644 --- a/packages/sdk/src/spaceWithEntitlements.test.ts +++ b/packages/sdk/src/spaceWithEntitlements.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ /** * @group with-entitilements */ diff --git a/packages/sdk/src/sync-agent/user/user.test.ts b/packages/sdk/src/sync-agent/user/user.test.ts index 3d008e23f..7e7411f0a 100644 --- a/packages/sdk/src/sync-agent/user/user.test.ts +++ b/packages/sdk/src/sync-agent/user/user.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ /** * @group with-entitilements */ diff --git a/packages/sdk/src/withEntitilements.test.ts b/packages/sdk/src/withEntitilements.test.ts index cd435f705..5a452110e 100644 --- a/packages/sdk/src/withEntitilements.test.ts +++ b/packages/sdk/src/withEntitilements.test.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ /** * @group with-entitilements */