Skip to content

Commit 25cab58

Browse files
committed
fixed some standard linting issues
1 parent 3943a95 commit 25cab58

File tree

3 files changed

+22
-15
lines changed

3 files changed

+22
-15
lines changed

lib/MainTemplate.js

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,18 @@ var OriginalSource = require("webpack-sources").OriginalSource;
77
var PrefixSource = require("webpack-sources").PrefixSource;
88
var Template = require("./Template");
99

10-
/* require function shortcuts:
11-
* __webpack_require__.s = the module id of the entry point
12-
* __webpack_require__.c = the module cache
13-
* __webpack_require__.m = the module functions
14-
* __webpack_require__.p = the bundle public path
15-
* __webpack_require__.i = the identity function used for harmony imports
16-
* __webpack_require__.e = the chunk ensure function
17-
* __webpack_require__.d = the exported propery define getter function
18-
* __webpack_require__.o = Object.prototype.hasOwnProperty.call
19-
* __webpack_require__.n = compatibility get default export
20-
* __webpack_require__.h = the webpack hash
21-
* __webpack_require__.oe = the uncatched error handler for the webpack runtime
22-
*/
10+
// require function shortcuts:
11+
// __webpack_require__.s = the module id of the entry point
12+
// __webpack_require__.c = the module cache
13+
// __webpack_require__.m = the module functions
14+
// __webpack_require__.p = the bundle public path
15+
// __webpack_require__.i = the identity function used for harmony imports
16+
// __webpack_require__.e = the chunk ensure function
17+
// __webpack_require__.d = the exported propery define getter function
18+
// __webpack_require__.o = Object.prototype.hasOwnProperty.call
19+
// __webpack_require__.n = compatibility get default export
20+
// __webpack_require__.h = the webpack hash
21+
// __webpack_require__.oe = the uncatched error handler for the webpack runtime
2322

2423
function MainTemplate(outputOptions) {
2524
Template.call(this, outputOptions);

lib/MovedToPluginWarningPlugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ MovedToPluginWarningPlugin.prototype.apply = function(compiler) {
1212
var optionName = this.optionName;
1313
var pluginName = this.pluginName;
1414
compiler.plugin("compilation", function(compilation) {
15-
compilation.warnings.push(new Error("webpack options:\nDEPRECATED option '" + optionName + "' will be moved to the " + pluginName + ". Use this instead.\nFor more info about the usage of the " + pluginName + " see https://webpack.github.io/docs/list-of-plugins.html"));
15+
compilation.warnings.push(new Error("webpack options:\nDEPRECATED option '" + optionName + "' will be moved to the " + pluginName + ". " +
16+
"Use this instead.\n" +
17+
"For more info about the usage of the " + pluginName + " see https://webpack.github.io/docs/list-of-plugins.html"));
1618
});
1719
};

lib/Parser.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,13 @@ Parser.prototype.walkCallExpression = function walkCallExpression(expression) {
817817
this.walkExpression(functionExpression.body);
818818
}.bind(this));
819819
}
820-
if(expression.callee.type === "MemberExpression" && expression.callee.object.type === "FunctionExpression" && !expression.callee.computed && ["call", "bind"].indexOf(expression.callee.property.name) >= 0 && expression.arguments && expression.arguments.length > 1) {
820+
if(expression.callee.type === "MemberExpression" &&
821+
expression.callee.object.type === "FunctionExpression" &&
822+
!expression.callee.computed &&
823+
(["call", "bind"]).indexOf(expression.callee.property.name) >= 0 &&
824+
expression.arguments &&
825+
expression.arguments.length > 1
826+
) {
821827
// (function(...) { }.call/bind(?, ...))
822828
walkIIFE.call(this, expression.callee.object, expression.arguments.slice(1));
823829
this.walkExpression(expression.arguments[0]);

0 commit comments

Comments
 (0)