Remove some eslint overrides (#5676)

* Remove some eslint overrides

* Use noop
This commit is contained in:
Jaco
2023-06-17 13:27:51 +03:00
committed by GitHub
parent 9913701e82
commit e89212b435
10 changed files with 21 additions and 39 deletions
-1
View File
@@ -108,7 +108,6 @@ export class RpcCore {
* @param {ProviderInterface} provider An API provider using any of the supported providers (HTTP, SC or WebSocket)
*/
constructor (instanceId: string, registry: Registry, { isPedantic = true, provider, userRpc = {} }: Options) {
// eslint-disable-next-line @typescript-eslint/unbound-method
if (!provider || !isFunction(provider.send)) {
throw new Error('Expected Provider to API create');
}
+2 -4
View File
@@ -26,9 +26,9 @@ describe('replay', (): void => {
it('returns the observable value', async (): Promise<void> => {
await new Promise<boolean>((resolve) => {
rpc.system.chain().subscribe((value: any): void => {
rpc.system.chain().subscribe((value?: { toString: () => string }): void => {
if (value) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access, jest/no-conditional-expect
// eslint-disable-next-line jest/no-conditional-expect
expect(value.toString()).toEqual('mockChain'); // Defined in MockProvider
resolve(true);
}
@@ -56,7 +56,6 @@ describe('replay', (): void => {
});
it('unsubscribes as required', async (): Promise<void> => {
// eslint-disable-next-line @typescript-eslint/unbound-method
rpc.provider.unsubscribe = jest.fn();
await new Promise<boolean>((resolve) => {
@@ -65,7 +64,6 @@ describe('replay', (): void => {
// There's a promise inside .unsubscribe(), wait a bit (> 2s)
setTimeout((): void => {
// eslint-disable-next-line @typescript-eslint/unbound-method
expect(rpc.provider.unsubscribe).toHaveBeenCalled();
resolve(true);
}, 3500);