Skip to content

Commit

Permalink
Merge branch 'indent-fix' of https://github.com/SimenB/webpack into S…
Browse files Browse the repository at this point in the history
…imenB-indent-fix
  • Loading branch information
sokra committed Jun 20, 2016
2 parents 1ebddbb + b1bdd69 commit e74b2f9
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 34 deletions.
6 changes: 1 addition & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@
"env": {
"node": true
},
"plugins": [
"nodeca"
],
"rules": {
"strict": 0,
"camelcase": 0,
"curly": 0,
"indent": [0, "tab"],
"nodeca/indent": [2, "tabs", 1 ],
"indent": [2, "tab", { "SwitchCase": 1 }],
"eol-last": 1,
"no-shadow": 0,
"no-redeclare": 2,
Expand Down
6 changes: 3 additions & 3 deletions hot/dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ if(module.hot) {

}).catch(function(err) {
if(module.hot.status() in {
abort: 1,
fail: 1
}) {
abort: 1,
fail: 1
}) {
console.warn("[HMR] Cannot apply update. Need to do a full reload!");
console.warn("[HMR] " + err.stack || err.message);
window.location.reload();
Expand Down
12 changes: 6 additions & 6 deletions hot/only-dev-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ if(module.hot) {
}
}).catch(function(err) {
if(module.hot.status() in {
abort: 1,
fail: 1
}) {
abort: 1,
fail: 1
}) {
console.warn("[HMR] Cannot apply update. Need to do a full reload!");
console.warn("[HMR] " + err.stack || err.message);
} else {
Expand All @@ -41,9 +41,9 @@ if(module.hot) {
});
}).catch(function(err) {
if(module.hot.status() in {
abort: 1,
fail: 1
}) {
abort: 1,
fail: 1
}) {
console.warn("[HMR] Cannot check for update. Need to do a full reload!");
console.warn("[HMR] " + err.stack || err.message);
} else {
Expand Down
6 changes: 3 additions & 3 deletions hot/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ if(module.hot) {
checkForUpdate(true);
}).catch(function(err) {
if(module.hot.status() in {
abort: 1,
fail: 1
}) {
abort: 1,
fail: 1
}) {
console.warn("[HMR] Cannot apply update.");
console.warn("[HMR] " + err.stack || err.message);
console.warn("[HMR] You need to restart the application!");
Expand Down
12 changes: 6 additions & 6 deletions hot/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ if(module.hot) {
}, function(err, renewedModules) {
if(err) {
if(module.hot.status() in {
abort: 1,
fail: 1
}) {
abort: 1,
fail: 1
}) {
console.warn("[HMR] Cannot apply update (Need to do a full reload!)");
console.warn("[HMR] " + err.stack || err.message);
console.warn("[HMR] You need to restart the application!");
Expand All @@ -37,9 +37,9 @@ if(module.hot) {
});
}).catch(function(err) {
if(module.hot.status() in {
abort: 1,
fail: 1
}) {
abort: 1,
fail: 1
}) {
console.warn("[HMR] Cannot apply update.");
console.warn("[HMR] " + err.stack || err.message);
console.warn("[HMR] You need to restart the application!");
Expand Down
8 changes: 4 additions & 4 deletions lib/NormalModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ NormalModule.prototype.build = function build(options, compilation, resolver, fs
if(options.module && options.module.noParse) {
if(Array.isArray(options.module.noParse)) {
if(options.module.noParse.some(function(regExp) {
return typeof regExp === "string" ?
return typeof regExp === "string" ?
this.request.indexOf(regExp) === 0 :
regExp.test(this.request);
}, this)) return callback();
}, this)) return callback();
} else if(typeof options.module.noParse === "string" ?
this.request.indexOf(options.module.noParse) === 0 :
options.module.noParse.test(this.request)) {
Expand Down Expand Up @@ -231,8 +231,8 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
var name = variable.name;
var expr = variable.expressionSource(dependencyTemplates, outputOptions, requestShortener);
if(availableVars.some(function(v) {
return v.name === name && v.expression.source() === expr.source();
})) return;
return v.name === name && v.expression.source() === expr.source();
})) return;
vars.push({
name: name,
expression: expr
Expand Down
4 changes: 2 additions & 2 deletions lib/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ Parser.prototype.initializeEvaluating = function() {
return element !== null && this.evaluateExpression(element);
}, this);
if(items.filter(function(i) {
return !i;
}).length > 0) return;
return !i;
}).length > 0) return;
return new BasicEvaluatedExpression().setItems(items).setRange(expr.range);
});
};
Expand Down
4 changes: 2 additions & 2 deletions lib/Template.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ Template.prototype.asString = function(str) {

Template.prototype.getModulesArrayBounds = function(modules) {
if(modules.some(function(module) {
return typeof module.id !== "number";
}))
return typeof module.id !== "number";
}))
return false;
var maxId = -Infinity;
var minId = Infinity;
Expand Down
4 changes: 2 additions & 2 deletions lib/optimize/RemoveParentModulesPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function debugIds(chunks) {
return chunk.debugId;
});
if(list.some(function(dId) {
return typeof dId !== "number";
})) return "no";
return typeof dId !== "number";
})) return "no";
list.sort();
return list.join(",");
}
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"diff": "^2.0.2",
"es6-promise-polyfill": "^1.1.1",
"eslint": "^1.1.0",
"eslint-plugin-nodeca": "^1.0.3",
"express": "~4.13.1",
"extract-text-webpack-plugin": "^1.0.0",
"file-loader": "~0.8.0",
Expand Down

0 comments on commit e74b2f9

Please sign in to comment.