mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Fix linter settings in @cosmjs/crypto
This commit is contained in:
parent
a762c896f3
commit
3bf3f45677
@ -25,7 +25,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"docs": "shx rm -rf docs && typedoc --options typedoc.js",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\" && tslint -t verbose --project .",
|
||||
"lint": "eslint --max-warnings 0 \"**/*.{js,ts}\"",
|
||||
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
|
||||
"format-text": "prettier --write --prose-wrap always --print-width 80 \"./*.md\"",
|
||||
"test-node": "node jasmine-testrunner.js",
|
||||
|
@ -14,7 +14,6 @@ describe("EnglishMnemonic", () => {
|
||||
const checksum = new Sha256(bip39EnglishTxt).digest();
|
||||
expect(checksum).toEqual(fromHex("2f5eed53a4727b4bf8880d8f3f199efc90e58503646d9ff8eff3a2ed3b24dbda"));
|
||||
|
||||
// tslint:disable-next-line: readonly-array
|
||||
const wordsFromSpec: string[] = [];
|
||||
|
||||
let start = 0; // the start cursor marks the first byte of the word
|
||||
@ -31,8 +30,6 @@ describe("EnglishMnemonic", () => {
|
||||
});
|
||||
});
|
||||
|
||||
// tslint:disable:no-unused-expression
|
||||
|
||||
it("works for valid inputs", () => {
|
||||
expect(() => {
|
||||
new EnglishMnemonic(
|
||||
@ -234,8 +231,6 @@ describe("EnglishMnemonic", () => {
|
||||
).toThrowError(/contains invalid word/i);
|
||||
});
|
||||
|
||||
// tslint:enable:no-unused-expression
|
||||
|
||||
describe("toString", () => {
|
||||
it("works", () => {
|
||||
const original =
|
||||
|
@ -28,7 +28,6 @@ export class EnglishMnemonic {
|
||||
}
|
||||
|
||||
// Throws with informative error message if mnemonic is not valid
|
||||
// tslint:disable-next-line:no-unused-expression
|
||||
bip39.mnemonicToEntropy(mnemonic);
|
||||
|
||||
this.data = mnemonic;
|
||||
|
@ -27,9 +27,9 @@ export class Hmac<H extends HashFunction> implements HashFunction {
|
||||
key = new Uint8Array([...key, ...zeroPadding]);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
// eslint-disable-next-line no-bitwise
|
||||
this.oKeyPad = key.map((keyByte) => keyByte ^ 0x5c);
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
// eslint-disable-next-line no-bitwise
|
||||
this.iKeyPad = key.map((keyByte) => keyByte ^ 0x36);
|
||||
this.messageHasher = new hashFunctionConstructor();
|
||||
this.blockSize = blockSize;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* tslint:disable:no-bitwise */
|
||||
/* eslint-disable no-bitwise */
|
||||
import { fromHex, toAscii } from "@iov/encoding";
|
||||
|
||||
import {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* tslint:disable:no-bitwise */
|
||||
/* eslint-disable no-bitwise */
|
||||
import { fromHex } from "@iov/encoding";
|
||||
|
||||
import { Secp256k1 } from "./secp256k1";
|
||||
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "../../tslint.json"
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user