From 35fea2a9f900ab28adbf0eef483612f9cb138bd9 Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Tue, 10 Sep 2024 12:57:57 +0300 Subject: [PATCH] inline ignore for depricated --- .eslintrc.js | 2 +- src/lib/merkletree/proof.ts | 1 + src/lib/utils/bytes.ts | 6 +++--- tests/full.test.ts | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f8272f8..90f0bbf 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,7 +10,7 @@ module.exports = { ...spellcheckerRule, cspell: { ...cspellConfig, - ignoreWords: ['sibligns', 'Elems', 'Froom', 'hextable'] + ignoreWords: ['Elems'] } } ] diff --git a/src/lib/merkletree/proof.ts b/src/lib/merkletree/proof.ts index 96552b3..e4436ec 100644 --- a/src/lib/merkletree/proof.ts +++ b/src/lib/merkletree/proof.ts @@ -141,6 +141,7 @@ export class Proof { * @deprecated The method should not be used and will be removed in the next major version, * please use proof.allSiblings instead */ +// eslint-disable-next-line @cspell/spellchecker export const siblignsFroomProof = (proof: Proof): Siblings => { return proof.allSiblings(); }; diff --git a/src/lib/utils/bytes.ts b/src/lib/utils/bytes.ts index 20fe5c9..7b60f2c 100644 --- a/src/lib/utils/bytes.ts +++ b/src/lib/utils/bytes.ts @@ -28,13 +28,13 @@ export const setBitBigEndian = (bitMap: Bytes, n: number): void => { bitMap[bitMap.length - parseInt(`${n / 8}`) - 1] |= 1 << n % 8; }; -const hextable = '0123456789abcdef'; +const hexTable = '0123456789abcdef'; export const bytes2Hex = (u: Bytes): string => { const arr = new Array(u.length * 2); let j = 0; u.forEach((v) => { - arr[j] = hextable[parseInt((v >> 4).toString(10))]; - arr[j + 1] = hextable[parseInt((v & 15).toString(10))]; + arr[j] = hexTable[parseInt((v >> 4).toString(10))]; + arr[j + 1] = hexTable[parseInt((v & 15).toString(10))]; j += 2; }); diff --git a/tests/full.test.ts b/tests/full.test.ts index 6e73885..eb0f232 100644 --- a/tests/full.test.ts +++ b/tests/full.test.ts @@ -260,7 +260,7 @@ for (let index = 0; index < storages.length; index++) { } }); - it('test sibligns from proof', async () => { + it('test siblings from proof', async () => { const sto = getTreeStorage(); const mt = new Merkletree(sto, true, 140);