mirror of https://github.com/webpack/webpack.git
linter fixes
This commit is contained in:
parent
f1d56dcc74
commit
784af506a3
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue