Skip to content

Commit

Permalink
lib,test: update in preparation for linter update
Browse files Browse the repository at this point in the history
ESLint 2.9.0 fixes some bugs that resulted in minor issues not being
caught by ESLint 2.7.0. Update instances of our code that will be
flagged when we upgrade to ESLint 2.9.0.

PR-URL: #6498
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
  • Loading branch information
Trott authored and Myles Borins committed Jun 24, 2016
1 parent 037291e commit 552e25c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ function byteLength(string, encoding) {
case 'ascii':
case 'binary':
// Deprecated
// eslint-disable-next-line no-fallthrough
case 'raw':
case 'raws':
return len;
Expand Down
1 change: 1 addition & 0 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,7 @@ exports.emitKeypressEvents = emitKeypressEvents;
*/

// Regexes used for ansi escape code splitting
// eslint-disable-next-line no-control-regex
const metaKeyCodeReAnywhere = /(?:\x1b)([a-zA-Z0-9])/;
const functionKeyCodeReAnywhere = new RegExp('(?:\x1b+)(O|N|\\[|\\[\\[)(?:' + [
'(\\d+)(?:;(\\d+))?([~^$])',
Expand Down
7 changes: 6 additions & 1 deletion test/parallel/test-http-destroyed-socket-write2.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,17 @@ server.listen(common.PORT, function() {
switch (er.code) {
// This is the expected case
case 'ECONNRESET':
// On windows this sometimes manifests as ECONNABORTED
break;

// On Windows, this sometimes manifests as ECONNABORTED
case 'ECONNABORTED':
break;

// This test is timing sensitive so an EPIPE is not out of the question.
// It should be infrequent, given the 50 ms timeout, but not impossible.
case 'EPIPE':
break;

default:
assert.strictEqual(er.code,
'ECONNRESET',
Expand Down

0 comments on commit 552e25c

Please sign in to comment.