tendermint-rpc: Remove tslint comments
This commit is contained in:
parent
3825af984c
commit
cff8e0eef4
@ -1,4 +1,3 @@
|
||||
// tslint:disable:readonly-array
|
||||
import { toAscii } from "@cosmjs/encoding";
|
||||
import { sleep } from "@cosmjs/utils";
|
||||
import { firstEvent, toListPromise } from "@iov/stream";
|
||||
|
||||
@ -197,7 +197,6 @@ export class Client {
|
||||
// starts with page 1 or whatever was provided (eg. to start on page 7)
|
||||
public async txSearchAll(params: requests.TxSearchParams): Promise<responses.TxSearchResponse> {
|
||||
let page = params.page || 1;
|
||||
// tslint:disable-next-line:readonly-array
|
||||
const txs: responses.TxResponse[] = [];
|
||||
let done = false;
|
||||
|
||||
|
||||
@ -27,7 +27,6 @@ describe("encodings", () => {
|
||||
describe("encodeTime", () => {
|
||||
it("works", () => {
|
||||
const readonlyDateWithNanoseconds = new ReadonlyDate(1464109200);
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
(readonlyDateWithNanoseconds as any).nanoseconds = 666666;
|
||||
expect(encodeTime(readonlyDateWithNanoseconds)).toEqual(
|
||||
Uint8Array.from([0x08, 173, 174, 89, 0x10, 170, 220, 215, 95]),
|
||||
|
||||
@ -162,7 +162,6 @@ export class DateTime {
|
||||
const readonlyDate = fromRfc3339(dateTimeString);
|
||||
const nanosecondsMatch = dateTimeString.match(/\.(\d+)Z$/);
|
||||
const nanoseconds = nanosecondsMatch ? nanosecondsMatch[1].slice(3) : "";
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
(readonlyDate as any).nanoseconds = parseInt(nanoseconds.padEnd(6, "0"), 10);
|
||||
return readonlyDate as ReadonlyDateWithNanoseconds;
|
||||
}
|
||||
@ -189,7 +188,7 @@ export function encodeString(s: string): Uint8Array {
|
||||
|
||||
// See https://github.com/tendermint/go-amino/blob/v0.15.0/encoder.go#L79-L87
|
||||
export function encodeInt(n: number): Uint8Array {
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
// eslint-disable-next-line no-bitwise
|
||||
return n >= 0x80 ? Uint8Array.from([(n & 0xff) | 0x80, ...encodeInt(n >> 7)]) : Uint8Array.from([n & 0xff]);
|
||||
}
|
||||
|
||||
|
||||
@ -46,7 +46,6 @@ describe("WebsocketClient", () => {
|
||||
const req = createJsonRpcRequest("subscribe", { query: query });
|
||||
const headers = client.listen(req);
|
||||
|
||||
// tslint:disable-next-line:readonly-array
|
||||
const events: SubscriptionEvent[] = [];
|
||||
|
||||
const sub = headers.subscribe({
|
||||
@ -109,7 +108,6 @@ describe("WebsocketClient", () => {
|
||||
const req = createJsonRpcRequest("subscribe", { query: query });
|
||||
const headers = client.listen(req);
|
||||
|
||||
// tslint:disable-next-line:readonly-array
|
||||
const events: SubscriptionEvent[] = [];
|
||||
|
||||
const sub = headers.subscribe({
|
||||
@ -148,7 +146,6 @@ describe("WebsocketClient", () => {
|
||||
const req = createJsonRpcRequest("subscribe", { query: query });
|
||||
const headers = client.listen(req);
|
||||
|
||||
// tslint:disable-next-line:readonly-array
|
||||
const receivedEvents: SubscriptionEvent[] = [];
|
||||
|
||||
setTimeout(() => client.disconnect(), 1500);
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
/* tslint:disable:readonly-keyword readonly-array no-object-mutation */
|
||||
import {
|
||||
isJsonRpcErrorResponse,
|
||||
JsonRpcId,
|
||||
|
||||
@ -19,7 +19,6 @@ describe("Hasher", () => {
|
||||
// curl "http://localhost:11133/block"
|
||||
const blockId = fromHex("153C484DCBC33633F0616BC019388C93DEA94F7880627976F2BFE83749E062F7");
|
||||
const time = new ReadonlyDate("2020-06-23T13:54:15.4638668Z");
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
(time as any).nanoseconds = 866800;
|
||||
const blockData = {
|
||||
version: {
|
||||
@ -58,7 +57,6 @@ describe("Hasher", () => {
|
||||
// curl "http://localhost:11133/block?height=13575"
|
||||
const blockId = fromHex("FF2995AF1F38B9A584077E53B5E144778718FB86539A51886A2C55F730403373");
|
||||
const time = new ReadonlyDate("2020-06-23T15:34:12.3232688Z");
|
||||
// tslint:disable-next-line:no-object-mutation
|
||||
(time as any).nanoseconds = 268800;
|
||||
const blockData = {
|
||||
version: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user