From f26b97c22ebc5a560f6c084ffb62869262115691 Mon Sep 17 00:00:00 2001 From: Maharshi Basu Date: Mon, 12 Feb 2024 17:37:01 +0530 Subject: [PATCH 1/4] chore: update to support bslint in eslint config Signed-off-by: Maharshi Basu --- .eslintrc.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b050f53e7..4654d837e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -43,9 +43,8 @@ } } ], - "parser": "babel-eslint", "parserOptions": { - "ecmaVersion": 10, + "ecmaVersion": "latest", "ecmaFeatures": { "globalReturn": true }, From 6a5573a8d0bd0dfc4716e4069cab3cbf593d817b Mon Sep 17 00:00:00 2001 From: Maharshi Basu Date: Mon, 12 Feb 2024 17:41:16 +0530 Subject: [PATCH 2/4] chore: match lint config file with bcrypto Signed-off-by: Maharshi Basu --- .eslintrc.json | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4654d837e..af7e62575 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,19 +1,9 @@ { "env": { - "es6": true, + "es2024": true, "node": true }, "extends": "eslint:recommended", - "globals": { - "Atomics": "readable", - "BigInt": "readable", - "BigInt64Array": "readable", - "BigUint64Array": "readable", - "queueMicrotask": "readable", - "SharedArrayBuffer": "readable", - "TextEncoder": "readable", - "TextDecoder": "readable" - }, "overrides": [ { "files": ["*.mjs"], From 6f39c701e4ff9c0b81c421257cb547b0865cdbc4 Mon Sep 17 00:00:00 2001 From: Maharshi Basu Date: Mon, 12 Feb 2024 21:50:00 +0530 Subject: [PATCH 3/4] test: fix error bslint error due to hasOwnProperty call Signed-off-by: Maharshi Basu --- test/descriptor-test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/descriptor-test.js b/test/descriptor-test.js index 4e10923de..00bbffb39 100644 --- a/test/descriptor-test.js +++ b/test/descriptor-test.js @@ -62,7 +62,7 @@ function createDescriptorFromOptions(desc, type) { describe('Descriptor', () => { for (const type in parsable) { - if (parsable.hasOwnProperty(type)) { + if (Object.prototype.hasOwnProperty.call(type)) { for (const data of parsable[type]) { const {input, descriptor, checksum, isrange, issolvable, hasprivatekeys, requirechecksum, network} = data; @@ -111,7 +111,7 @@ describe('Descriptor', () => { } for (const type in validAddresses) { - if (validAddresses.hasOwnProperty(type)) { + if (Object.property.hasOwnProperty.call(type)) { for (const data of validAddresses[type]) { const {input, network, range, error} = data; From 714e59f39834ed520276b22c1dd3f649252d59c0 Mon Sep 17 00:00:00 2001 From: Maharshi Basu Date: Mon, 12 Feb 2024 22:00:02 +0530 Subject: [PATCH 4/4] fix: failing test due to change in hasOwnProperty call on validAddresses Signed-off-by: Maharshi Basu --- test/descriptor-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/descriptor-test.js b/test/descriptor-test.js index 00bbffb39..7ac203c9d 100644 --- a/test/descriptor-test.js +++ b/test/descriptor-test.js @@ -111,7 +111,7 @@ describe('Descriptor', () => { } for (const type in validAddresses) { - if (Object.property.hasOwnProperty.call(type)) { + if (validAddresses.hasOwnProperty.call(type)) { for (const data of validAddresses[type]) { const {input, network, range, error} = data;