diff --git a/lib/_debugger.js b/lib/_debugger.js index a4638048ea41f5..0815b037dc2793 100644 --- a/lib/_debugger.js +++ b/lib/_debugger.js @@ -573,7 +573,7 @@ Client.prototype.mirrorObject = function(handle, depth, cb) { }); cb(null, mirror); } - }; + } }); return; } else if (handle.type === 'function') { @@ -798,7 +798,7 @@ function Interface(stdin, stdout, args) { } else { self.repl.context[key] = fn; } - }; + } // Copy all prototype methods in repl context // Setup them as getters if possible diff --git a/lib/events.js b/lib/events.js index ea3f2831eb3bbc..6cb6900267b2ec 100644 --- a/lib/events.js +++ b/lib/events.js @@ -417,7 +417,7 @@ function listenerCount(type) { } return 0; -}; +} // About 1.5x faster than the two-arg version of Array#splice(). function spliceOne(list, index) { diff --git a/lib/net.js b/lib/net.js index 21f1f8e0c6e465..06271163501c6c 100644 --- a/lib/net.js +++ b/lib/net.js @@ -1186,7 +1186,7 @@ function createServerHandle(address, port, addressType, fd) { } return handle; -}; +} exports._createServerHandle = createServerHandle; diff --git a/test/common.js b/test/common.js index 028a171d01615d..b293a72ba9805b 100644 --- a/test/common.js +++ b/test/common.js @@ -337,7 +337,7 @@ function leakedGlobals() { leaked.push(val); return leaked; -}; +} exports.leakedGlobals = leakedGlobals; // Turn this off if the test should not check for global leaks. diff --git a/test/debugger/helper-debugger-repl.js b/test/debugger/helper-debugger-repl.js index 714a22c2a22fdc..20cd341165042d 100644 --- a/test/debugger/helper-debugger-repl.js +++ b/test/debugger/helper-debugger-repl.js @@ -103,7 +103,7 @@ function addTest(input, output) { } else { quit(); } - }; + } expected.push({input: input, lines: output, callback: next}); } diff --git a/test/parallel/test-child-process-spawnsync-input.js b/test/parallel/test-child-process-spawnsync-input.js index 338b4277fb1982..0116f092920a8b 100644 --- a/test/parallel/test-child-process-spawnsync-input.js +++ b/test/parallel/test-child-process-spawnsync-input.js @@ -23,7 +23,7 @@ var ret; function checkSpawnSyncRet(ret) { assert.strictEqual(ret.status, 0); assert.strictEqual(ret.error, undefined); -}; +} function verifyBufOutput(ret) { checkSpawnSyncRet(ret); diff --git a/test/parallel/test-http-1.0-keep-alive.js b/test/parallel/test-http-1.0-keep-alive.js index 516a02031ef247..fa49707c24a8d5 100644 --- a/test/parallel/test-http-1.0-keep-alive.js +++ b/test/parallel/test-http-1.0-keep-alive.js @@ -122,7 +122,7 @@ function check(tests) { current++; if (ctx.expectClose) return; conn.removeListener('close', onclose); - conn.removeListener('data', ondata);; + conn.removeListener('data', ondata); connected(); } conn.on('data', ondata); diff --git a/test/parallel/test-stream-big-packet.js b/test/parallel/test-stream-big-packet.js index 67bb32847bd7f7..e64f4aa34fd481 100644 --- a/test/parallel/test-stream-big-packet.js +++ b/test/parallel/test-stream-big-packet.js @@ -8,7 +8,7 @@ var passed = false; function PassThrough() { stream.Transform.call(this); -}; +} util.inherits(PassThrough, stream.Transform); PassThrough.prototype._transform = function(chunk, encoding, done) { this.push(chunk); @@ -17,7 +17,7 @@ PassThrough.prototype._transform = function(chunk, encoding, done) { function TestStream() { stream.Transform.call(this); -}; +} util.inherits(TestStream, stream.Transform); TestStream.prototype._transform = function(chunk, encoding, done) { if (!passed) { diff --git a/test/parallel/test-stream-pipe-without-listenerCount.js b/test/parallel/test-stream-pipe-without-listenerCount.js index d7a6a6b653a6bf..872be6d7be5ce8 100644 --- a/test/parallel/test-stream-pipe-without-listenerCount.js +++ b/test/parallel/test-stream-pipe-without-listenerCount.js @@ -16,4 +16,4 @@ r.on('error', common.mustCall(noop)); w.on('error', common.mustCall(noop)); r.pipe(w); -function noop() {}; +function noop() {} diff --git a/test/parallel/test-stream-writable-change-default-encoding.js b/test/parallel/test-stream-writable-change-default-encoding.js index d8193123d6f3af..d1d4af5b824baf 100644 --- a/test/parallel/test-stream-writable-change-default-encoding.js +++ b/test/parallel/test-stream-writable-change-default-encoding.js @@ -8,7 +8,7 @@ var util = require('util'); function MyWritable(fn, options) { stream.Writable.call(this, options); this.fn = fn; -}; +} util.inherits(MyWritable, stream.Writable); diff --git a/test/parallel/test-stream-writable-decoded-encoding.js b/test/parallel/test-stream-writable-decoded-encoding.js index b5f1b4f6b73f49..75d5d424766323 100644 --- a/test/parallel/test-stream-writable-decoded-encoding.js +++ b/test/parallel/test-stream-writable-decoded-encoding.js @@ -8,7 +8,7 @@ var util = require('util'); function MyWritable(fn, options) { stream.Writable.call(this, options); this.fn = fn; -}; +} util.inherits(MyWritable, stream.Writable); @@ -17,7 +17,7 @@ MyWritable.prototype._write = function(chunk, encoding, callback) { callback(); }; -;(function decodeStringsTrue() { +(function decodeStringsTrue() { var m = new MyWritable(function(isBuffer, type, enc) { assert(isBuffer); assert.equal(type, 'object'); @@ -28,7 +28,7 @@ MyWritable.prototype._write = function(chunk, encoding, callback) { m.end(); })(); -;(function decodeStringsFalse() { +(function decodeStringsFalse() { var m = new MyWritable(function(isBuffer, type, enc) { assert(!isBuffer); assert.equal(type, 'string'); diff --git a/test/parallel/test-stream2-base64-single-char-read-end.js b/test/parallel/test-stream2-base64-single-char-read-end.js index 900e090921b712..0f9f56b3e70730 100644 --- a/test/parallel/test-stream2-base64-single-char-read-end.js +++ b/test/parallel/test-stream2-base64-single-char-read-end.js @@ -17,7 +17,7 @@ src._read = function(n) { src.push(new Buffer('1')); src.push(null); }); - }; + } }; dst._write = function(chunk, enc, cb) { diff --git a/test/parallel/test-stream3-pause-then-read.js b/test/parallel/test-stream3-pause-then-read.js index e4e33738b33206..0aee70f6832c7f 100644 --- a/test/parallel/test-stream3-pause-then-read.js +++ b/test/parallel/test-stream3-pause-then-read.js @@ -42,7 +42,7 @@ function read100() { function readn(n, then) { console.error('read %d', n); expectEndingData -= n; - ;(function read() { + (function read() { var c = r.read(n); if (!c) r.once('readable', read); diff --git a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js index c9ca3eafd64ebf..a26b548385e5f6 100644 --- a/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js +++ b/test/parallel/test-timers-socket-timeout-removes-other-socket-unref-timer.js @@ -39,7 +39,7 @@ server.listen(common.PORT, common.localhostIPv4, function() { if (nbClientsEnded === 2) { server.close(); } - }; + } const client1 = net.connect({ port: common.PORT }); client1.on('end', addEndedClient); diff --git a/test/parallel/test-tls-npn-server-client.js b/test/parallel/test-tls-npn-server-client.js index 211cfc7ed35067..d74d65c8b03bd7 100644 --- a/test/parallel/test-tls-npn-server-client.js +++ b/test/parallel/test-tls-npn-server-client.js @@ -85,7 +85,7 @@ function startTest() { callback(); }); - }; + } connectClient(clientsOptions[0], function() { connectClient(clientsOptions[1], function() { diff --git a/test/parallel/test-tls-sni-option.js b/test/parallel/test-tls-sni-option.js index 510b929ae2a17b..83e62133363677 100644 --- a/test/parallel/test-tls-sni-option.js +++ b/test/parallel/test-tls-sni-option.js @@ -146,7 +146,7 @@ function startTest() { else connectClient(i + 1, callback); } - }; + } connectClient(0, function() { server.close(); diff --git a/test/parallel/test-tls-sni-server-client.js b/test/parallel/test-tls-sni-server-client.js index 8eb80b50e41540..733713c8e72df8 100644 --- a/test/parallel/test-tls-sni-server-client.js +++ b/test/parallel/test-tls-sni-server-client.js @@ -103,7 +103,7 @@ function startTest() { // Continue start(); }); - }; + } start(); } diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index 9fa087261e0127..20e6138b268b5c 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -1569,6 +1569,6 @@ var throws = [ ]; for (var i = 0; i < throws.length; i++) { assert.throws(function() { url.format(throws[i]); }, TypeError); -}; +} assert(url.format('') === ''); assert(url.format({}) === ''); diff --git a/test/parallel/test-zlib-flush-drain.js b/test/parallel/test-zlib-flush-drain.js index f04dac9f0699ac..14a42e76cc3874 100644 --- a/test/parallel/test-zlib-flush-drain.js +++ b/test/parallel/test-zlib-flush-drain.js @@ -33,7 +33,7 @@ deflater.flush(function(err) { }); deflater.on('drain', function() { - drainCount++;; + drainCount++; }); process.once('exit', function() { diff --git a/test/pummel/test-tls-server-large-request.js b/test/pummel/test-tls-server-large-request.js index d7663e936de78a..cb740c63ed7d68 100644 --- a/test/pummel/test-tls-server-large-request.js +++ b/test/pummel/test-tls-server-large-request.js @@ -24,7 +24,7 @@ var options = { function Mediator() { stream.Writable.call(this); this.buf = ''; -}; +} util.inherits(Mediator, stream.Writable); Mediator.prototype._write = function write(data, enc, cb) { diff --git a/test/sequential/test-child-process-fork-getconnections.js b/test/sequential/test-child-process-fork-getconnections.js index a7521f1635fb39..f7bb9f5eea216f 100644 --- a/test/sequential/test-child-process-fork-getconnections.js +++ b/test/sequential/test-child-process-fork-getconnections.js @@ -11,7 +11,7 @@ if (process.argv[2] === 'child') { process.on('message', function(m, socket) { function sendClosed(id) { process.send({ id: id, status: 'closed'}); - }; + } if (m.cmd === 'new') { assert(socket); @@ -82,7 +82,7 @@ if (process.argv[2] === 'child') { }); sent++; child.send({ id: i, cmd: 'close' }); - }; + } let closeEmitted = false; server.on('close', function() { diff --git a/test/sequential/test-tcp-wrap-listen.js b/test/sequential/test-tcp-wrap-listen.js index 44254c3d3f39aa..d16069f25dbeab 100644 --- a/test/sequential/test-tcp-wrap-listen.js +++ b/test/sequential/test-tcp-wrap-listen.js @@ -65,7 +65,7 @@ server.onconnection = function(err, client) { writeCount++; console.log('write ' + writeCount); maybeCloseClient(); - }; + } sliceCount++; } else {