Skip to content

Commit

Permalink
Bump eslint from 3.19.0 to 6.6.0
Browse files Browse the repository at this point in the history
Bumps [eslint](https://github.com/eslint/eslint) from 3.19.0 to 6.6.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](eslint/eslint@v3.19.0...v6.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
  • Loading branch information
dependabot[bot] authored and Joris-van-der-Wel committed Nov 6, 2019
1 parent 94fa2ca commit a4c67b0
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 40 deletions.
32 changes: 16 additions & 16 deletions lib/JSONBird.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ class JSONBird extends Duplex {
if (/[^\x20\x09\x0a\x0d]/.test(options.endOfJSONWhitespace)) {
throw Error(
'JSONBird: The `endOfJSONWhitespace` option must only contain whitespace characters ' +
'(whitespace as defined in rfc4627)'
'(whitespace as defined in rfc4627)',
);
}

Expand Down Expand Up @@ -308,9 +308,9 @@ class JSONBird extends Duplex {
reject(new RPCRequestError(
Error(
'JSONBird: The Writable side of this Duplex stream has finished while this call was pending, ' +
'we will be unable to receive a response object'
'we will be unable to receive a response object',
),
-32000
-32000,
));
}
clientPendingMap.clear();
Expand Down Expand Up @@ -926,7 +926,7 @@ class JSONBird extends Duplex {
jsonrpc: '2.0',
id,
error: JSONBird.errorToResponseObject(error, this.sendErrorStack),
})
}),
)
.then(object => this.sendObject(object));

Expand All @@ -935,7 +935,7 @@ class JSONBird extends Duplex {
// pendingResponsesPromise always resolves to undefined, and it never rejects.
// this needed so that if our write stream is closed, we do not close our read stream too early
this[PRIVATE].pendingResponsesPromise = this[PRIVATE].pendingResponsesPromise.then(
() => returnPromise.then(NOOP, NOOP)
() => returnPromise.then(NOOP, NOOP),
);

return returnPromise;
Expand Down Expand Up @@ -976,7 +976,7 @@ class JSONBird extends Duplex {
// note: notify() does have this check because it does not care about response objects
return Promise.reject(new Error(
'JSONBird: The Writable side of this Duplex stream has finished, ' +
'we will be unable to receive a response object for this call'
'we will be unable to receive a response object for this call',
));
}

Expand All @@ -997,7 +997,7 @@ class JSONBird extends Duplex {
pendingData.timer = 0;
reject(new RPCRequestError(Error(`JSONBird: Remote Call "${name}" timed out after ${timeout}ms`), -32000));
},
timeout
timeout,
);
});

Expand All @@ -1019,7 +1019,7 @@ class JSONBird extends Duplex {
});

this[PRIVATE].pendingRequestPromise = this[PRIVATE].pendingRequestPromise.then(
() => returnPromise.then(NOOP, NOOP)
() => returnPromise.then(NOOP, NOOP),
);

return returnPromise;
Expand Down Expand Up @@ -1210,7 +1210,7 @@ class JSONBird extends Duplex {
// So assume this is a request object, not sending a response at all is worse than sending too much.
return Promise.reject(new RPCRequestError(
Error(`JSONBird: Error parsing your JSON string: ${err.message}`),
-32700
-32700,
))
.catch(handleRpcError);
}
Expand Down Expand Up @@ -1238,13 +1238,13 @@ class JSONBird extends Duplex {
// So assume this is a request object, not sending a response at all is worse than sending too much.
return Promise.reject(new RPCRequestError(
Error(`JSONBird: Error parsing your JSON string: ${err.message}`),
-32700
-32700,
))
.catch(handleRpcError);
}

const promises = readJSONParserValues.map(object =>
this.handleObject(object).catch(handleRpcError)
this.handleObject(object).catch(handleRpcError),
);
readJSONParserValues.length = 0;

Expand All @@ -1260,7 +1260,7 @@ class JSONBird extends Duplex {
error => {
/* istanbul ignore next */
callback(error);
}
},
);
}

Expand Down Expand Up @@ -1288,9 +1288,9 @@ class JSONBird extends Duplex {
return Promise.reject(new RPCRequestError(
Error(
'JSONBird: Unable to determine if the message was a request or response object (one of the "method", ' +
'"result" or "error" properties must be present)'
'"result" or "error" properties must be present)',
),
-32600
-32600,
));
}

Expand All @@ -1314,7 +1314,7 @@ class JSONBird extends Duplex {

if (!('jsonrpc' in object)) {
throw new RPCRequestError(Error(
'JSONBird: Invalid Request: "jsonrpc" attribute is missing (JSON-RPC version 1 is not supported)'
'JSONBird: Invalid Request: "jsonrpc" attribute is missing (JSON-RPC version 1 is not supported)',
), -32600);
}

Expand Down Expand Up @@ -1427,7 +1427,7 @@ class JSONBird extends Duplex {
sendObject(object) {
if (this.ended) {
return Promise.reject(new Error(
'JSONBird: The Readable side of this Duplex stream has ended, unable to send any request objects'
'JSONBird: The Readable side of this Duplex stream has ended, unable to send any request objects',
));
}

Expand Down
2 changes: 1 addition & 1 deletion lib/promiseExtras.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const PromiseFinally = function(callback) {
value => this.constructor.resolve(callback()).then(() => value),
reason => this.constructor.resolve(callback()).then(() => {
throw reason;
})
}),
);
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"babel-eslint": "^7.1.1",
"chai": "^3.5.0",
"coveralls": "^2.11.15",
"eslint": "^3.13.1",
"eslint": "^6.6.0",
"eslint-plugin-import": "^2.2.0",
"istanbul": "^0.4.4",
"jsdoc-to-markdown": "^1.3.6",
Expand Down
8 changes: 4 additions & 4 deletions test/JSONBird.js
Original file line number Diff line number Diff line change
Expand Up @@ -416,17 +416,17 @@ describe('JSONBird', () => {
rpc.callLocal('__defineGetter__'),
rpc.callLocal('__defineSetter__'),
rpc.callLocal('__lookupGetter__'),
rpc.callLocal('__lookupSetter__')
rpc.callLocal('__lookupSetter__'),
);
}

return Promise.all(
calls.map(
promise => promise.then(
() => assert(false),
error => error
)
)
error => error,
),
),
)
.then(errors => {
// eslint-disable-next-line prefer-const
Expand Down
2 changes: 1 addition & 1 deletion test/PromiseFateTracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class PromiseFateTracker {
},
error => {
this.fates.set(name, {promise, reject: error});
}
},
);
}

Expand Down
8 changes: 4 additions & 4 deletions test/json-message.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('JSONBird handling string/buffer streams in objectMode', () => {
writeWait.advance();
callback();
},
() => writeEvents.push(END)
() => writeEvents.push(END),
);
});

Expand All @@ -74,7 +74,7 @@ describe('JSONBird handling string/buffer streams in objectMode', () => {
readStream.write('{"jsonrpc": "2.0", "method": "いろはにほ", "params": [42,23], "id":0}');
readStream.write('{"jsonrpc": "2.0", "method": "foo", "params": [100, {"foo": "bar ¢ bar € bar 𐍈 bar"}],"id": 1}');
readStream.write(
new Buffer('{"jsonrpc": "2.0", "method": "foo", "params": ["Árvíztűrő tükörfúrógép"],"id": 2}', 'utf8')
new Buffer('{"jsonrpc": "2.0", "method": "foo", "params": ["Árvíztűrő tükörfúrógép"],"id": 2}', 'utf8'),
);
readStream.write('{"jsonrpc": "2.0", "method": "foo", "params": [], "id":3}\n\r\t ');
readStream.write('{"jsonrpc": "2.0", "method": "foo", "params": [], "id":4}\r\n');
Expand Down Expand Up @@ -105,7 +105,7 @@ describe('JSONBird handling string/buffer streams in objectMode', () => {
readStream.write('{"foo": 123]}');
readStream.write(
// two json objects in one message:
'{"jsonrpc": "2.0", "method": "foo", "params": [],"id": 0}{"jsonrpc": "2.0", "method": "foo", "params": [],"id": 1}'
'{"jsonrpc": "2.0", "method": "foo", "params": [],"id": 0}{"jsonrpc": "2.0", "method": "foo", "params": [],"id": 1}',
);

return writeWait.wait(3);
Expand Down Expand Up @@ -168,7 +168,7 @@ describe('JSONBird handling string/buffer streams in objectMode', () => {
writeWait.advance();
callback();
},
() => writeEvents.push(END)
() => writeEvents.push(END),
);
});

Expand Down
6 changes: 3 additions & 3 deletions test/json-stream.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('JSONBird handling string/buffer streams', () => {
writeWait.advance();
callback();
},
() => writeEvents.push(END)
() => writeEvents.push(END),
);
});

Expand All @@ -76,7 +76,7 @@ describe('JSONBird handling string/buffer streams', () => {
'{"jsonrpc": "2.0", "method": "foo", "params": [100, {"foo": "bar ¢ bar € bar 𐍈 bar"}],"id": 1}' +
'{"jsonrpc": "2.0", "method": "foo", "params": ["Árvíztűrő tükörfúrógép"],"id": 2}' +
'{"jsonrpc": "2.0", "method": "foo", "params": [], "id":3}\n\r\t ' +
'{"jsonrpc": "2.0", "method": "foo", "params": [], "id":4}\r\n'
'{"jsonrpc": "2.0", "method": "foo", "params": [], "id":4}\r\n',
);

return writeWait.wait(5);
Expand Down Expand Up @@ -170,7 +170,7 @@ describe('JSONBird handling string/buffer streams', () => {
},
() => {
resolve(writtenString);
}
},
);
});
});
Expand Down
16 changes: 8 additions & 8 deletions test/object.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ describe('JSONBird handling object streams', () => {
() => {
writeWait.advance();
writeEvents.push(FINISH);
}
},
);
});

Expand Down Expand Up @@ -1069,7 +1069,7 @@ describe('JSONBird handling object streams', () => {
assert.instanceOf(error, RPCResponseError);
assert.strictEqual(error.name, 'RPCResponseError');
assert.strictEqual(error.message, 'Invalid Response: Must have a "error" or an "result" property');
}
},
);

return Promise.all([
Expand All @@ -1093,27 +1093,27 @@ describe('JSONBird handling object streams', () => {

assert.strictEqual(
protocolErrorEvents[0].message,
'JSONBird: Invalid Response: "jsonrpc" property must be "2.0"'
'JSONBird: Invalid Response: "jsonrpc" property must be "2.0"',
);
assert.strictEqual(
protocolErrorEvents[1].message,
'JSONBird: Invalid Response: "jsonrpc" property must be "2.0"'
'JSONBird: Invalid Response: "jsonrpc" property must be "2.0"',
);
assert.strictEqual(
protocolErrorEvents[2].message,
'JSONBird: Invalid Response: "id" property must be a number or string'
'JSONBird: Invalid Response: "id" property must be a number or string',
);
assert.strictEqual(
protocolErrorEvents[3].message,
'JSONBird: Invalid Response: "id" property must be a number or string'
'JSONBird: Invalid Response: "id" property must be a number or string',
);
assert.strictEqual(
protocolErrorEvents[4].message,
'JSONBird: Invalid Response: The "error" and "result" properties are both present'
'JSONBird: Invalid Response: The "error" and "result" properties are both present',
);
assert.strictEqual(
protocolErrorEvents[5].message,
'JSONBird: Invalid Response: Unknown id'
'JSONBird: Invalid Response: Unknown id',
);
});
});
Expand Down
4 changes: 2 additions & 2 deletions test/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('JSONBird handling pings', () => {
() => {
writeWait.advance();
writeEvents.push(FINISH);
}
},
);

pingEventWait = new Wait();
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('JSONBird handling pings', () => {

return rpc.callLocal('jsonbird.ping').then(
() => assert(false),
error => assert.strictEqual(error.code, -32601) // not found
error => assert.strictEqual(error.code, -32601), // not found
);
});

Expand Down

0 comments on commit a4c67b0

Please sign in to comment.