test: use eslint to fix var->const/let

Manually fix issues that eslint --fix couldn't do automatically.

PR-URL: https://github.com/nodejs/node/pull/10685
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
This commit is contained in:
Gibson Fahnestock 2017-01-08 13:19:00 +00:00
parent 1ef401ce92
commit 7a0e462f9f
730 changed files with 3387 additions and 3368 deletions

View file

@ -3,8 +3,8 @@ require('../common');
const assert = require('assert');
const net = require('net');
var binaryString = '';
for (var i = 255; i >= 0; i--) {
let binaryString = '';
for (let i = 255; i >= 0; i--) {
const s = `'\\${i.toString(8)}'`;
const S = eval(s);
assert.strictEqual(S.charCodeAt(0), i);
@ -13,7 +13,7 @@ for (var i = 255; i >= 0; i--) {
}
// safe constructor
var echoServer = net.Server(function(connection) {
const echoServer = net.Server(function(connection) {
connection.setEncoding('latin1');
connection.on('data', function(chunk) {
connection.write(chunk, 'latin1');
@ -24,10 +24,10 @@ var echoServer = net.Server(function(connection) {
});
echoServer.listen(0);
var recv = '';
let recv = '';
echoServer.on('listening', function() {
var j = 0;
let j = 0;
const c = net.createConnection({
port: this.address().port
});