enable prefer const (#5113)

This commit is contained in:
Henry Zhu
2017-01-14 09:48:52 -05:00
committed by GitHub
parent 982850731e
commit 672adba9a1
177 changed files with 1862 additions and 1863 deletions

View File

@@ -5,8 +5,8 @@
* when found, before invoking the "real" _babel-node(1) executable.
*/
let getV8Flags = require("v8flags");
let path = require("path");
const getV8Flags = require("v8flags");
const path = require("path");
let args = [path.join(__dirname, "_babel-node")];
@@ -14,7 +14,7 @@ let babelArgs = process.argv.slice(2);
let userArgs;
// separate node arguments from script arguments
let argSeparator = babelArgs.indexOf("--");
const argSeparator = babelArgs.indexOf("--");
if (argSeparator > -1) {
userArgs = babelArgs.slice(argSeparator); // including the --
babelArgs = babelArgs.slice(0, argSeparator);
@@ -75,13 +75,13 @@ getV8Flags(function (err, v8Flags) {
}
try {
let kexec = require("kexec");
const kexec = require("kexec");
kexec(process.argv[0], args);
} catch (err) {
if (err.code !== "MODULE_NOT_FOUND") throw err;
let child_process = require("child_process");
let proc = child_process.spawn(process.argv[0], args, { stdio: "inherit" });
const child_process = require("child_process");
const proc = child_process.spawn(process.argv[0], args, { stdio: "inherit" });
proc.on("exit", function (code, signal) {
process.on("exit", function () {
if (signal) {