Skip to content

Commit

Permalink
Merge PR #876 from 'nodech/update-lint'
Browse files Browse the repository at this point in the history
  • Loading branch information
nodech committed Nov 28, 2023
2 parents aed3600 + 96820a0 commit b6778c4
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 20 deletions.
15 changes: 2 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -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"],
Expand Down Expand Up @@ -44,9 +34,8 @@
}
}
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 10,
"ecmaVersion": 11,
"ecmaFeatures": {
"globalReturn": true
},
Expand Down
2 changes: 1 addition & 1 deletion lib/dns/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 1 addition & 1 deletion lib/primitives/airdropkey.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];

Expand Down
2 changes: 1 addition & 1 deletion lib/primitives/claim.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -3268,7 +3268,7 @@ class Wallet extends EventEmitter {
flags,
ns.claimed,
ns.renewals,
await this.wdb.getRenewalBlock(),
await this.wdb.getRenewalBlock()
);

if (!mtx)
Expand Down
2 changes: 1 addition & 1 deletion test/interactive-swap-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/util/memwallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -1538,7 +1538,7 @@ class MemWallet {
flags,
ns.claimed,
ns.renewals,
this.getRenewalBlock(),
this.getRenewalBlock()
);

const mtx = new MTX();
Expand Down
2 changes: 1 addition & 1 deletion test/wallet-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2723,7 +2723,7 @@ describe('Wallet', function() {
output.covenant.setReveal(
nameHash,
start,
Buffer.alloc(32),
Buffer.alloc(32)
);

const mtx = new MTX();
Expand Down

0 comments on commit b6778c4

Please sign in to comment.