linter fixes

This commit is contained in:
Tobias Koppers 2017-01-11 10:51:58 +01:00
parent f1d56dcc74
commit 784af506a3
4 changed files with 10 additions and 7 deletions

View File

@ -174,7 +174,7 @@ function processOptions(options) {
var firstOptions = [].concat(options)[0];
var statsPresetToOptions = require("../lib/Stats.js").presetToOptions;
let outputOptions = options.stats;
var outputOptions = options.stats;
if(typeof outputOptions === "boolean" || typeof outputOptions === "string")
outputOptions = statsPresetToOptions(outputOptions);
else

View File

@ -34,13 +34,13 @@ MultiStats.prototype.toJson = function(options, forToString) {
options = {};
}
var jsons = this.stats.map((stat, idx) => {
const childOptions = Stats.getChildOptions(options, idx)
var childOptions = Stats.getChildOptions(options, idx);
var obj = stat.toJson(childOptions, forToString);
obj.name = stat.compilation && stat.compilation.name;
return obj;
});
const showVersion = typeof options.version === "undefined" ? jsons.every(j => j.version) : options.version !== false;
const showHash = typeof options.hash === "undefined" ? jsons.every(j => j.hash) : options.hash !== false;
var showVersion = typeof options.version === "undefined" ? jsons.every(j => j.version) : options.version !== false;
var showHash = typeof options.hash === "undefined" ? jsons.every(j => j.hash) : options.hash !== false;
jsons.forEach(j => {
if(showVersion)
delete j.version;

View File

@ -175,7 +175,10 @@ describe("MultiStats", function() {
})
];
myMultiStats = new MultiStats(stats);
result = myMultiStats.toJson({ version: false, hash: false });
result = myMultiStats.toJson({
version: false,
hash: false
});
});
it("returns plain object representation", function() {

View File

@ -1,7 +1,7 @@
"use strict";
module.exports = function testAssertions(code, stdout, stderr) {
code.should.be.oneOf(0, 1);
code.should.be.eql(0);
stdout.should.be.ok();
stderr.should.be.empty();
}
};