lint: update to es2020. Use latest bslint

This commit is contained in:
Nodari Chkuaselidze 2023-11-28 15:18:14 +04:00
parent aed3600e9a
commit 96820a03a5
No known key found for this signature in database
GPG key ID: B018A7BB437D1F05
8 changed files with 9 additions and 20 deletions

View file

@ -1,19 +1,9 @@
{
"env": {
"es6": true,
"es2020": 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"],
@ -44,9 +34,8 @@
}
}
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 10,
"ecmaVersion": 11,
"ecmaFeatures": {
"globalReturn": true
},

View file

@ -877,7 +877,7 @@ function typeToClass(type) {
function stringToClass(type) {
assert(typeof type === 'string');
if (!hsTypes.hasOwnProperty(type))
if (!Object.prototype.hasOwnProperty.call(hsTypes, type))
return null;
return typeToClass(hsTypes[type]);

View file

@ -363,7 +363,7 @@ class AirdropKey extends bio.Struct {
fromJSON(json) {
assert(json && typeof json === 'object');
assert(typeof json.type === 'string');
assert(keyTypes.hasOwnProperty(json.type));
assert(Object.prototype.hasOwnProperty.call(keyTypes, json.type));
this.type = keyTypes[json.type];

View file

@ -175,7 +175,7 @@ class Claim extends bio.Struct {
Buffer.from(data.name, 'binary'),
flags,
data.commitHash,
data.commitHeight,
data.commitHeight
);
tx.inputs.push(input);

View file

@ -3268,7 +3268,7 @@ class Wallet extends EventEmitter {
flags,
ns.claimed,
ns.renewals,
await this.wdb.getRenewalBlock(),
await this.wdb.getRenewalBlock()
);
if (!mtx)

View file

@ -170,7 +170,7 @@ describe('Interactive name swap', function() {
0, // flags, may be required if name was CLAIMed
ns.claimed,
ns.renewals,
await wdb.getRenewalBlock(),
await wdb.getRenewalBlock()
);
const output1 = new Output();

View file

@ -1538,7 +1538,7 @@ class MemWallet {
flags,
ns.claimed,
ns.renewals,
this.getRenewalBlock(),
this.getRenewalBlock()
);
const mtx = new MTX();

View file

@ -2723,7 +2723,7 @@ describe('Wallet', function() {
output.covenant.setReveal(
nameHash,
start,
Buffer.alloc(32),
Buffer.alloc(32)
);
const mtx = new MTX();