diff --git a/.eslintrc b/.eslintrc index 6aec251478c720..a77195180ce1f8 100644 --- a/.eslintrc +++ b/.eslintrc @@ -17,6 +17,8 @@ ecmaFeatures: rules: # Possible Errors # list: https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors + ## disallow trailing commas on final line of object/array declaration + comma-dangle: 2 ## check debugger sentence no-debugger: 2 ## check duplicate arguments diff --git a/lib/cluster.js b/lib/cluster.js index c8bf658d5b32a8..c6ae95d57a7fca 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -647,7 +647,7 @@ function workerInit() { close: close, listen: listen, ref: ref, - unref: unref, + unref: unref }; if (message.sockname) { handle.getsockname = getsockname; // TCP handles only. diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 6487de2e9efa08..2cb831f953d01a 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -549,7 +549,7 @@ function setupChannel(target, channel) { this._handleQueue.push({ callback: callback, handle: handle, - message: message.msg, + message: message.msg }); return this._handleQueue.length === 1; } @@ -575,7 +575,7 @@ function setupChannel(target, channel) { this._handleQueue.push({ callback: callback, handle: null, - message: message, + message: message }); return this._handleQueue.length === 1; } diff --git a/test/addons/make-callback/test.js b/test/addons/make-callback/test.js index f3c98770ef335a..99e168f346a392 100644 --- a/test/addons/make-callback/test.js +++ b/test/addons/make-callback/test.js @@ -30,7 +30,7 @@ const recv = { assert.strictEqual(this, recv); assert.strictEqual(x, 1337); return 42; - }), + }) }; assert.strictEqual(42, makeCallback(recv, 'one')); diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js index 5591b4f2b38e90..f7c430ee285460 100644 --- a/test/addons/repl-domain-abort/test.js +++ b/test/addons/repl-domain-abort/test.js @@ -20,7 +20,7 @@ var lines = [ // This line shouldn't cause an assertion error. 'require(\'' + buildPath + '\')' + // Log output to double check callback ran. - '.method(function() { console.log(\'cb_ran\'); });', + '.method(function() { console.log(\'cb_ran\'); });' ]; var dInput = new stream.Readable(); diff --git a/test/common.js b/test/common.js index 43f4362b45cbfe..358f3744c5b46f 100644 --- a/test/common.js +++ b/test/common.js @@ -90,7 +90,7 @@ exports.localIPv6Hosts = [ 'ipv6-loopback', // Typically universal - 'localhost', + 'localhost' ]; Object.defineProperty(exports, 'inFreeBSDJail', { diff --git a/test/debugger/test-debugger-repl-restart.js b/test/debugger/test-debugger-repl-restart.js index 206cd2e7417627..926d627a899b8c 100644 --- a/test/debugger/test-debugger-repl-restart.js +++ b/test/debugger/test-debugger-repl-restart.js @@ -14,7 +14,7 @@ initialLines.splice(2, 0, /Restoring/, /Warning/); // Restart the debugged script repl.addTest('restart', [ - /terminated/, + /terminated/ ].concat(initialLines)); repl.addTest('list(5)', linesWithBreakpoint); diff --git a/test/debugger/test-debugger-repl-term.js b/test/debugger/test-debugger-repl-term.js index 6872f6ce2f9c72..a03b3d90f8f094 100644 --- a/test/debugger/test-debugger-repl-term.js +++ b/test/debugger/test-debugger-repl-term.js @@ -19,7 +19,7 @@ addTest('n', [ addTest('', [ /debug>/, /break in .*:5/, - /3/, /4/, /5/, /6/, /7/, + /3/, /4/, /5/, /6/, /7/ ]); // continue @@ -33,12 +33,12 @@ addTest('c', [ addTest('', [ /debug>/, /break in .*:5/, - /3/, /4/, /5/, /6/, /7/, + /3/, /4/, /5/, /6/, /7/ ]); // should repeat continue addTest('', [ /debug>/, /break in .*:23/, - /21/, /22/, /23/, /24/, /25/, + /21/, /22/, /23/, /24/, /25/ ]); diff --git a/test/parallel/test-cluster-setup-master-cumulative.js b/test/parallel/test-cluster-setup-master-cumulative.js index f0f98fbdbfb3a6..06543617714315 100644 --- a/test/parallel/test-cluster-setup-master-cumulative.js +++ b/test/parallel/test-cluster-setup-master-cumulative.js @@ -13,7 +13,7 @@ assert.deepEqual(cluster.settings, { args: process.argv.slice(2), exec: process.argv[1], execArgv: process.execArgv, - silent: false, + silent: false }); console.log('ok sets defaults'); @@ -36,6 +36,6 @@ assert.deepEqual(cluster.settings, { args: ['foo', 'bar'], exec: 'overridden', execArgv: ['baz', 'bang'], - silent: false, + silent: false }); console.log('ok preserves current settings'); diff --git a/test/parallel/test-cluster-setup-master-multiple.js b/test/parallel/test-cluster-setup-master-multiple.js index 5ceff2bddfaf9d..e605e4c50f1c72 100644 --- a/test/parallel/test-cluster-setup-master-multiple.js +++ b/test/parallel/test-cluster-setup-master-multiple.js @@ -24,7 +24,7 @@ cluster.on('setup', function() { var execs = [ 'node-next', 'node-next-2', - 'node-next-3', + 'node-next-3' ]; process.on('exit', function assertTests() { diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js index 68394dd9bcaff9..3897364b52e609 100644 --- a/test/parallel/test-crypto-dh.js +++ b/test/parallel/test-crypto-dh.js @@ -254,7 +254,7 @@ ecdh5.setPrivateKey(cafebabeKey, 'hex'); [ // Some invalid private keys for the secp256k1 curve. '0000000000000000000000000000000000000000000000000000000000000000', 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141', - 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF', + 'FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF' ].forEach(function(element, index, object) { assert.throws(function() { ecdh5.setPrivateKey(element, 'hex'); diff --git a/test/parallel/test-crypto-hmac.js b/test/parallel/test-crypto-hmac.js index 600dd0dbb2c8bd..b7ed810a3dfae7 100644 --- a/test/parallel/test-crypto-hmac.js +++ b/test/parallel/test-crypto-hmac.js @@ -56,7 +56,7 @@ var wikipedia = [ 'b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c71214' + '4292c5ad' } - }, + } ]; for (let i = 0, l = wikipedia.length; i < l; i++) { diff --git a/test/parallel/test-debug-signal-cluster.js b/test/parallel/test-debug-signal-cluster.js index 7a950458b87271..f8364294ad3fb5 100644 --- a/test/parallel/test-debug-signal-cluster.js +++ b/test/parallel/test-debug-signal-cluster.js @@ -67,7 +67,7 @@ var expectedLines = [ 'Starting debugger agent.', 'Debugger listening on port ' + (port + 1), 'Starting debugger agent.', - 'Debugger listening on port ' + (port + 2), + 'Debugger listening on port ' + (port + 2) ]; function assertOutputLines() { diff --git a/test/parallel/test-dns.js b/test/parallel/test-dns.js index d473ae8d952602..5457c0a46b77e3 100644 --- a/test/parallel/test-dns.js +++ b/test/parallel/test-dns.js @@ -11,7 +11,7 @@ function noop() {} var goog = [ '8.8.8.8', - '8.8.4.4', + '8.8.4.4' ]; assert.doesNotThrow(function() { dns.setServers(goog); }); assert.deepEqual(dns.getServers(), goog); @@ -20,7 +20,7 @@ assert.deepEqual(dns.getServers(), goog); var goog6 = [ '2001:4860:4860::8888', - '2001:4860:4860::8844', + '2001:4860:4860::8844' ]; assert.doesNotThrow(function() { dns.setServers(goog6); }); assert.deepEqual(dns.getServers(), goog6); @@ -31,11 +31,11 @@ assert.deepEqual(dns.getServers(), goog6); var ports = [ '4.4.4.4:53', - '[2001:4860:4860::8888]:53', + '[2001:4860:4860::8888]:53' ]; var portsExpected = [ '4.4.4.4', - '2001:4860:4860::8888', + '2001:4860:4860::8888' ]; dns.setServers(ports); assert.deepEqual(dns.getServers(), portsExpected); diff --git a/test/parallel/test-domain-no-error-handler-abort-on-uncaught.js b/test/parallel/test-domain-no-error-handler-abort-on-uncaught.js index 2ecb4ffb81796a..5bf2b755f32a8c 100644 --- a/test/parallel/test-domain-no-error-handler-abort-on-uncaught.js +++ b/test/parallel/test-domain-no-error-handler-abort-on-uncaught.js @@ -134,7 +134,7 @@ const tests = [ }); }); }); - }, + } ]; if (process.argv[2] === 'child') { diff --git a/test/parallel/test-http-agent-error-on-idle.js b/test/parallel/test-http-agent-error-on-idle.js index e3388ee0dcbd96..b4da30e77bf674 100644 --- a/test/parallel/test-http-agent-error-on-idle.js +++ b/test/parallel/test-http-agent-error-on-idle.js @@ -5,7 +5,7 @@ var http = require('http'); var Agent = http.Agent; var agent = new Agent({ - keepAlive: true, + keepAlive: true }); var requestParams = { diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 6892b38719fb1a..178f3f4e4fc19e 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -9,7 +9,7 @@ var requests_done = 0; var options = { method: 'GET', port: common.PORT, - host: '127.0.0.1', + host: '127.0.0.1' }; //http.globalAgent.maxSockets = 15; diff --git a/test/parallel/test-http-content-length.js b/test/parallel/test-http-content-length.js index ec60396a24545d..fd1c1294b3f8f5 100644 --- a/test/parallel/test-http-content-length.js +++ b/test/parallel/test-http-content-length.js @@ -5,17 +5,17 @@ var http = require('http'); var expectedHeadersMultipleWrites = { 'connection': 'close', - 'transfer-encoding': 'chunked', + 'transfer-encoding': 'chunked' }; var expectedHeadersEndWithData = { 'connection': 'close', - 'content-length': 'hello world'.length, + 'content-length': 'hello world'.length }; var expectedHeadersEndNoData = { 'connection': 'close', - 'content-length': '0', + 'content-length': '0' }; var receivedRequests = 0; diff --git a/test/parallel/test-http-flush-headers.js b/test/parallel/test-http-flush-headers.js index 5e91a4643a9019..9a253c346b1ddc 100644 --- a/test/parallel/test-http-flush-headers.js +++ b/test/parallel/test-http-flush-headers.js @@ -13,7 +13,7 @@ server.listen(common.PORT, '127.0.0.1', function() { const req = http.request({ method: 'GET', host: '127.0.0.1', - port: common.PORT, + port: common.PORT }); req.setHeader('foo', 'bar'); req.flushHeaders(); diff --git a/test/parallel/test-http-flush-response-headers.js b/test/parallel/test-http-flush-response-headers.js index 76e739741cb2db..1f1f669a01c3cc 100644 --- a/test/parallel/test-http-flush-response-headers.js +++ b/test/parallel/test-http-flush-response-headers.js @@ -14,7 +14,7 @@ server.listen(common.PORT, common.localhostIPv4, function() { var req = http.request({ method: 'GET', host: common.localhostIPv4, - port: common.PORT, + port: common.PORT }, onResponse); req.end(); diff --git a/test/parallel/test-http-flush.js b/test/parallel/test-http-flush.js index 8dc7ba7418dc88..55dcba4312ca6f 100644 --- a/test/parallel/test-http-flush.js +++ b/test/parallel/test-http-flush.js @@ -9,7 +9,7 @@ http.createServer(function(req, res) { var req = http.request({ method: 'POST', host: '127.0.0.1', - port: common.PORT, + port: common.PORT }); req.flush(); // Flush the request headers. req.flush(); // Should be idempotent. diff --git a/test/parallel/test-http-server-multiheaders.js b/test/parallel/test-http-server-multiheaders.js index 99d72988479928..61576f3dd7c6af 100644 --- a/test/parallel/test-http-server-multiheaders.js +++ b/test/parallel/test-http-server-multiheaders.js @@ -52,7 +52,7 @@ srv.listen(common.PORT, function() { ['sec-websocket-extensions', 'baz'], ['constructor', 'foo'], ['constructor', 'bar'], - ['constructor', 'baz'], + ['constructor', 'baz'] ] }); }); diff --git a/test/parallel/test-http-server-multiheaders2.js b/test/parallel/test-http-server-multiheaders2.js index 438e8ba759e8ba..c5b349d966b6e0 100644 --- a/test/parallel/test-http-server-multiheaders2.js +++ b/test/parallel/test-http-server-multiheaders2.js @@ -28,7 +28,7 @@ var multipleAllowed = [ // make sure that unspecified headers is treated as multiple 'Some-Random-Header', - 'X-Some-Random-Header', + 'X-Some-Random-Header' ]; var multipleForbidden = [ @@ -42,7 +42,7 @@ var multipleForbidden = [ 'If-Unmodified-Since', 'From', 'Location', - 'Max-Forwards', + 'Max-Forwards' // special case, tested differently //'Content-Length', @@ -85,6 +85,6 @@ srv.listen(common.PORT, function() { host: 'localhost', port: common.PORT, path: '/', - headers: headers, + headers: headers }); }); diff --git a/test/parallel/test-http-server-stale-close.js b/test/parallel/test-http-server-stale-close.js index 349e869c1a4fbc..b1cfb045d00910 100644 --- a/test/parallel/test-http-server-stale-close.js +++ b/test/parallel/test-http-server-stale-close.js @@ -9,7 +9,7 @@ if (process.env.NODE_TEST_FORK) { headers: {'Content-Length': '42'}, method: 'POST', host: '127.0.0.1', - port: common.PORT, + port: common.PORT }, process.exit); req.write('BAM'); req.end(); diff --git a/test/parallel/test-listen-fd-cluster.js b/test/parallel/test-listen-fd-cluster.js index c321f699d7a89d..d803cf958fcb10 100644 --- a/test/parallel/test-listen-fd-cluster.js +++ b/test/parallel/test-listen-fd-cluster.js @@ -41,7 +41,7 @@ test(function(parent) { http.get({ server: 'localhost', port: PORT, - path: '/', + path: '/' }).on('response', function(res) { var s = ''; res.on('data', function(c) { diff --git a/test/parallel/test-listen-fd-detached-inherit.js b/test/parallel/test-listen-fd-detached-inherit.js index 472b1e8ff939f0..0aaae672362779 100644 --- a/test/parallel/test-listen-fd-detached-inherit.js +++ b/test/parallel/test-listen-fd-detached-inherit.js @@ -39,7 +39,7 @@ function test() { http.get({ server: 'localhost', port: PORT, - path: '/', + path: '/' }).on('response', function(res) { var s = ''; res.on('data', function(c) { diff --git a/test/parallel/test-listen-fd-detached.js b/test/parallel/test-listen-fd-detached.js index 12c8c3ddc43fac..31e32b4776116f 100644 --- a/test/parallel/test-listen-fd-detached.js +++ b/test/parallel/test-listen-fd-detached.js @@ -39,7 +39,7 @@ function test() { http.get({ server: 'localhost', port: PORT, - path: '/', + path: '/' }).on('response', function(res) { var s = ''; res.on('data', function(c) { diff --git a/test/parallel/test-listen-fd-server.js b/test/parallel/test-listen-fd-server.js index 3e0fa521f75334..4870f7bcecc4a5 100644 --- a/test/parallel/test-listen-fd-server.js +++ b/test/parallel/test-listen-fd-server.js @@ -30,7 +30,7 @@ test(function(child) { http.get({ server: 'localhost', port: PORT, - path: '/', + path: '/' }).on('response', function(res) { var s = ''; res.on('data', function(c) { diff --git a/test/parallel/test-net-localerror.js b/test/parallel/test-net-localerror.js index ed7c9471e0397f..cac404fe916df3 100644 --- a/test/parallel/test-net-localerror.js +++ b/test/parallel/test-net-localerror.js @@ -6,13 +6,13 @@ var net = require('net'); connect({ host: 'localhost', port: common.PORT, - localPort: 'foobar', + localPort: 'foobar' }, 'localPort should be a number: foobar'); connect({ host: 'localhost', port: common.PORT, - localAddress: 'foobar', + localAddress: 'foobar' }, 'localAddress should be a valid IP: foobar'); function connect(opts, msg) { diff --git a/test/parallel/test-path-parse-format.js b/test/parallel/test-path-parse-format.js index a28444cd3bca76..72c426a8cc7788 100644 --- a/test/parallel/test-path-parse-format.js +++ b/test/parallel/test-path-parse-format.js @@ -72,7 +72,7 @@ const errors = [ {method: 'format', input: [true], message: /Parameter "pathObject" must be an object, not boolean/}, {method: 'format', input: [1], - message: /Parameter "pathObject" must be an object, not number/}, + message: /Parameter "pathObject" must be an object, not number/} ]; checkParseFormat(path.win32, winPaths); diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js index e026c0b583cd9e..c2ff8dc3233ddd 100644 --- a/test/parallel/test-readline-keys.js +++ b/test/parallel/test-readline-keys.js @@ -50,14 +50,14 @@ addTest('io.JS', [ { name: 'o', sequence: 'o' }, undefined, // emitted as `emit('keypress', '.', undefined)` { name: 'j', sequence: 'J', shift: true }, - { name: 's', sequence: 'S', shift: true }, + { name: 's', sequence: 'S', shift: true } ]); // named characters addTest('\n\r\t', [ { name: 'enter', sequence: '\n' }, { name: 'return', sequence: '\r' }, - { name: 'tab', sequence: '\t' }, + { name: 'tab', sequence: '\t' } ]); // space and backspace @@ -67,14 +67,14 @@ addTest('\b\x7f\x1b\b\x1b\x7f \x1b ', [ { name: 'backspace', sequence: '\x1b\b', meta: true }, { name: 'backspace', sequence: '\x1b\x7f', meta: true }, { name: 'space', sequence: ' ' }, - { name: 'space', sequence: '\x1b ', meta: true }, + { name: 'space', sequence: '\x1b ', meta: true } ]); // control keys addTest('\x01\x0b\x10', [ { name: 'a', sequence: '\x01', ctrl: true }, { name: 'k', sequence: '\x0b', ctrl: true }, - { name: 'p', sequence: '\x10', ctrl: true }, + { name: 'p', sequence: '\x10', ctrl: true } ]); // alt keys @@ -82,19 +82,19 @@ addTest('a\x1baA\x1bA', [ { name: 'a', sequence: 'a' }, { name: 'a', sequence: '\x1ba', meta: true }, { name: 'a', sequence: 'A', shift: true }, - { name: 'a', sequence: '\x1bA', meta: true, shift: true }, + { name: 'a', sequence: '\x1bA', meta: true, shift: true } ]); // xterm/gnome addTest('\x1bOA\x1bOB', [ { name: 'up', sequence: '\x1bOA', code: 'OA' }, - { name: 'down', sequence: '\x1bOB', code: 'OB' }, + { name: 'down', sequence: '\x1bOB', code: 'OB' } ]); // old xterm shift-arrows addTest('\x1bO2A\x1bO2B', [ { name: 'up', sequence: '\x1bO2A', code: 'OA', shift: true }, - { name: 'down', sequence: '\x1bO2B', code: 'OB', shift: true }, + { name: 'down', sequence: '\x1bO2B', code: 'OB', shift: true } ]); // gnome terminal @@ -102,26 +102,26 @@ addTest('\x1b[A\x1b[B\x1b[2A\x1b[2B', [ { name: 'up', sequence: '\x1b[A', code: '[A' }, { name: 'down', sequence: '\x1b[B', code: '[B' }, { name: 'up', sequence: '\x1b[2A', code: '[A', shift: true }, - { name: 'down', sequence: '\x1b[2B', code: '[B', shift: true }, + { name: 'down', sequence: '\x1b[2B', code: '[B', shift: true } ]); // rxvt addTest('\x1b[20~\x1b[2$\x1b[2^', [ { name: 'f9', sequence: '\x1b[20~', code: '[20~' }, { name: 'insert', sequence: '\x1b[2$', code: '[2$', shift: true }, - { name: 'insert', sequence: '\x1b[2^', code: '[2^', ctrl: true }, + { name: 'insert', sequence: '\x1b[2^', code: '[2^', ctrl: true } ]); // xterm + modifiers addTest('\x1b[20;5~\x1b[6;5^', [ { name: 'f9', sequence: '\x1b[20;5~', code: '[20~', ctrl: true }, - { name: 'pagedown', sequence: '\x1b[6;5^', code: '[6^', ctrl: true }, + { name: 'pagedown', sequence: '\x1b[6;5^', code: '[6^', ctrl: true } ]); addTest('\x1b[H\x1b[5H\x1b[1;5H', [ { name: 'home', sequence: '\x1b[H', code: '[H' }, { name: 'home', sequence: '\x1b[5H', code: '[H', ctrl: true }, - { name: 'home', sequence: '\x1b[1;5H', code: '[H', ctrl: true }, + { name: 'home', sequence: '\x1b[1;5H', code: '[H', ctrl: true } ]); // escape sequences broken into multiple data chunks @@ -129,7 +129,7 @@ addTest('\x1b[D\x1b[C\x1b[D\x1b[C'.split(''), [ { name: 'left', sequence: '\x1b[D', code: '[D' }, { name: 'right', sequence: '\x1b[C', code: '[C' }, { name: 'left', sequence: '\x1b[D', code: '[D' }, - { name: 'right', sequence: '\x1b[C', code: '[C' }, + { name: 'right', sequence: '\x1b[C', code: '[C' } ]); // escape sequences mixed with regular ones @@ -139,7 +139,7 @@ addTest('\x1b[DD\x1b[2DD\x1b[2^D', [ { name: 'left', sequence: '\x1b[2D', code: '[D', shift: true }, { name: 'd', sequence: 'D', shift: true }, { name: 'insert', sequence: '\x1b[2^', code: '[2^', ctrl: true }, - { name: 'd', sequence: 'D', shift: true }, + { name: 'd', sequence: 'D', shift: true } ]); // color sequences @@ -147,5 +147,5 @@ addTest('\x1b[31ma\x1b[39ma', [ { name: 'undefined', sequence: '\x1b[31m', code: '[31m' }, { name: 'a', sequence: 'a' }, { name: 'undefined', sequence: '\x1b[39m', code: '[39m' }, - { name: 'a', sequence: 'a' }, + { name: 'a', sequence: 'a' } ]); diff --git a/test/parallel/test-repl-setprompt.js b/test/parallel/test-repl-setprompt.js index 2708a3e6af5448..dd97c56623410a 100644 --- a/test/parallel/test-repl-setprompt.js +++ b/test/parallel/test-repl-setprompt.js @@ -6,7 +6,7 @@ const os = require('os'); var args = [ '-e', - 'var e = new (require("repl")).REPLServer("foo.. "); e.context.e = e;', + 'var e = new (require("repl")).REPLServer("foo.. "); e.context.e = e;' ]; var p = 'bar.. '; diff --git a/test/parallel/test-repl.js b/test/parallel/test-repl.js index d9e69cd6140b1f..ac10fce312654b 100644 --- a/test/parallel/test-repl.js +++ b/test/parallel/test-repl.js @@ -286,7 +286,7 @@ function error_test() { // REPL should get a normal require() function, not one that allows // access to internal modules without the --expose_internals flag. { client: client_unix, send: 'require("internal/repl")', - expect: /^Error: Cannot find module 'internal\/repl'/ }, + expect: /^Error: Cannot find module 'internal\/repl'/ } ]); } diff --git a/test/parallel/test-timers-active.js b/test/parallel/test-timers-active.js index d8faa1f5a33483..fe98b1dd689641 100644 --- a/test/parallel/test-timers-active.js +++ b/test/parallel/test-timers-active.js @@ -23,7 +23,7 @@ legitTimers.forEach(function(legit) { // active() should not create a timer for these var bogusTimers = [ { _idleTimeout: -1 }, - { _idleTimeout: undefined }, + { _idleTimeout: undefined } ]; bogusTimers.forEach(function(bogus) { diff --git a/test/parallel/test-tls-check-server-identity.js b/test/parallel/test-tls-check-server-identity.js index 8d2155b94ea9af..c38ebfb813bcf3 100644 --- a/test/parallel/test-tls-check-server-identity.js +++ b/test/parallel/test-tls-check-server-identity.js @@ -198,7 +198,7 @@ var tests = [ }, error: 'Host: localhost. is not in the cert\'s altnames: ' + 'DNS:a.com' - }, + } ]; tests.forEach(function(test, i) { diff --git a/test/parallel/test-tls-connect-no-host.js b/test/parallel/test-tls-connect-no-host.js index a6ead6ea6dceae..dfa5eaa6486c7b 100644 --- a/test/parallel/test-tls-connect-no-host.js +++ b/test/parallel/test-tls-connect-no-host.js @@ -24,7 +24,7 @@ tls.createServer({ var socket = tls.connect({ port: common.PORT, - ca: cert, + ca: cert // No host set here. 'localhost' is the default, // but tls.checkServerIdentity() breaks before the fix with: // Error: Hostname/IP doesn't match certificate's altnames: diff --git a/test/parallel/test-tls-interleave.js b/test/parallel/test-tls-interleave.js index fd93a05e593107..3b80833bff31eb 100644 --- a/test/parallel/test-tls-interleave.js +++ b/test/parallel/test-tls-interleave.js @@ -19,7 +19,7 @@ var options = { key: fs.readFileSync(dir + '/test_key.pem'), var writes = [ 'some server data', 'and a separate packet', - 'and one more', + 'and one more' ]; var receivedWrites = 0; diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js index d74d65c8b03bd7..579b7b467ff46c 100644 --- a/test/parallel/test-tls-npn-server-client.js +++ b/test/parallel/test-tls-npn-server-client.js @@ -32,7 +32,7 @@ var serverOptions = { cb(null, tls.createSecureContext({ key: loadPEM('agent2-key'), cert: loadPEM('agent2-cert'), - crl: loadPEM('ca2-crl'), + crl: loadPEM('ca2-crl') })); }, NPNProtocols: ['a', 'b', 'c'] diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index 95bde7b861e668..1f2e133e08c49d 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -707,7 +707,7 @@ var parseTests = { hostname: '-lovemonsterz.tumblr.com', href: 'http://-lovemonsterz.tumblr.com/rss', pathname: '/rss', - path: '/rss', + path: '/rss' }, 'http://-lovemonsterz.tumblr.com:80/rss': { @@ -718,7 +718,7 @@ var parseTests = { hostname: '-lovemonsterz.tumblr.com', href: 'http://-lovemonsterz.tumblr.com:80/rss', pathname: '/rss', - path: '/rss', + path: '/rss' }, 'http://user:pass@-lovemonsterz.tumblr.com/rss': { @@ -729,7 +729,7 @@ var parseTests = { hostname: '-lovemonsterz.tumblr.com', href: 'http://user:pass@-lovemonsterz.tumblr.com/rss', pathname: '/rss', - path: '/rss', + path: '/rss' }, 'http://user:pass@-lovemonsterz.tumblr.com:80/rss': { @@ -741,7 +741,7 @@ var parseTests = { hostname: '-lovemonsterz.tumblr.com', href: 'http://user:pass@-lovemonsterz.tumblr.com:80/rss', pathname: '/rss', - path: '/rss', + path: '/rss' }, 'http://_jabber._tcp.google.com/test': { @@ -751,7 +751,7 @@ var parseTests = { hostname: '_jabber._tcp.google.com', href: 'http://_jabber._tcp.google.com/test', pathname: '/test', - path: '/test', + path: '/test' }, 'http://user:pass@_jabber._tcp.google.com/test': { @@ -762,7 +762,7 @@ var parseTests = { hostname: '_jabber._tcp.google.com', href: 'http://user:pass@_jabber._tcp.google.com/test', pathname: '/test', - path: '/test', + path: '/test' }, 'http://_jabber._tcp.google.com:80/test': { @@ -773,7 +773,7 @@ var parseTests = { hostname: '_jabber._tcp.google.com', href: 'http://_jabber._tcp.google.com:80/test', pathname: '/test', - path: '/test', + path: '/test' }, 'http://user:pass@_jabber._tcp.google.com:80/test': { @@ -785,7 +785,7 @@ var parseTests = { hostname: '_jabber._tcp.google.com', href: 'http://user:pass@_jabber._tcp.google.com:80/test', pathname: '/test', - path: '/test', + path: '/test' }, 'http://x:1/\' <>"`/{}|\\^~`/': { @@ -1117,7 +1117,7 @@ var formatTests = { hostname: 'ex.com', hash: '#frag', search: '?abc=the#1?&foo=bar', - pathname: '/foo?100%m#r', + pathname: '/foo?100%m#r' }, // `?` and `#` in search only @@ -1127,7 +1127,7 @@ var formatTests = { hostname: 'ex.com', hash: '#frag', search: '?abc=the#1?&foo=bar', - pathname: '/fooA100%mBr', + pathname: '/fooA100%mBr' } }; for (const u in formatTests) { diff --git a/test/parallel/test-util-inspect.js b/test/parallel/test-util-inspect.js index 57833d65f5bb95..f20123fdafaf35 100644 --- a/test/parallel/test-util-inspect.js +++ b/test/parallel/test-util-inspect.js @@ -361,7 +361,7 @@ var w = { '\\': 1, '\\\\': 2, '\\\\\\': 3, - '\\\\\\\\': 4, + '\\\\\\\\': 4 }; var y = ['a', 'b', 'c']; diff --git a/test/parallel/test-vm-basic.js b/test/parallel/test-vm-basic.js index f08c8383b84a18..ca14789241e119 100644 --- a/test/parallel/test-vm-basic.js +++ b/test/parallel/test-vm-basic.js @@ -11,7 +11,7 @@ var result = vm.runInNewContext( ); assert.deepEqual(sandbox, { foo: 'bar', - typeofProcess: 'undefined', + typeofProcess: 'undefined' }); assert.strictEqual(result, 'function'); diff --git a/test/parallel/test-zlib-convenience-methods.js b/test/parallel/test-zlib-convenience-methods.js index 70c102efd2862c..cc410a847227bb 100644 --- a/test/parallel/test-zlib-convenience-methods.js +++ b/test/parallel/test-zlib-convenience-methods.js @@ -10,14 +10,14 @@ var hadRun = 0; var expect = 'blahblahblahblahblahblah'; var opts = { level: 9, - chunkSize: 1024, + chunkSize: 1024 }; [ ['gzip', 'gunzip'], ['gzip', 'unzip'], ['deflate', 'inflate'], - ['deflateRaw', 'inflateRaw'], + ['deflateRaw', 'inflateRaw'] ].forEach(function(method) { zlib[method[0]](expect, opts, function(err, result) { diff --git a/test/pummel/test-keep-alive.js b/test/pummel/test-keep-alive.js index 46190555b27263..d275d167665fcc 100644 --- a/test/pummel/test-keep-alive.js +++ b/test/pummel/test-keep-alive.js @@ -30,7 +30,7 @@ function runAb(opts, callback) { var args = [ '-c', opts.concurrent || 100, '-t', opts.threads || 2, - '-d', opts.duration || '10s', + '-d', opts.duration || '10s' ]; if (!opts.keepalive) { diff --git a/test/sequential/test-net-localport.js b/test/sequential/test-net-localport.js index 09b6627c79ce47..7fd509c71b7862 100644 --- a/test/sequential/test-net-localport.js +++ b/test/sequential/test-net-localport.js @@ -14,7 +14,7 @@ var server = net.createServer(function(socket) { var client = net.connect({ host: '127.0.0.1', port: common.PORT, - localPort: common.PORT + 1, + localPort: common.PORT + 1 }).on('connect', function() { assert.strictEqual(client.localPort, common.PORT + 1); });