Run new lint rules (#5413)

This commit is contained in:
Brian Ng
2017-03-04 09:46:01 -06:00
committed by Henry Zhu
parent f7e2d88f6c
commit 8a82cc060a
181 changed files with 1459 additions and 1454 deletions

View File

@@ -29,10 +29,10 @@ program.parse(process.argv);
register({
extensions: program.extensions,
ignore: program.ignore,
only: program.only,
plugins: program.plugins,
presets: program.presets,
ignore: program.ignore,
only: program.only,
plugins: program.plugins,
presets: program.presets,
});
//
@@ -55,8 +55,8 @@ const replPlugin = ({ types: t }) => ({
// If the executed code doesn't evaluate to a value,
// prevent implicit strict mode from printing 'use strict'.
path.pushContainer("body", t.expressionStatement(t.identifier("undefined")));
}
}
},
},
});
//
@@ -68,11 +68,11 @@ const _eval = function (code, filename) {
code = babel.transform(code, {
filename: filename,
presets: program.presets,
plugins: (program.plugins || []).concat([replPlugin])
plugins: (program.plugins || []).concat([replPlugin]),
}).code;
return vm.runInThisContext(code, {
filename: filename
filename: filename,
});
};
@@ -85,10 +85,10 @@ if (program.eval || program.print) {
const module = new Module(global.__filename);
module.filename = global.__filename;
module.paths = Module._nodeModulePaths(global.__dirname);
module.paths = Module._nodeModulePaths(global.__dirname);
global.exports = module.exports;
global.module = module;
global.module = module;
global.require = module.require.bind(module);
const result = _eval(code, global.__filename);
@@ -141,7 +141,7 @@ function replStart() {
input: process.stdin,
output: process.stdout,
eval: replEval,
useGlobal: true
useGlobal: true,
});
}