Skip to content

Commit afd1125

Browse files
committed
stricter linting and bug fixes
1 parent 1f781c1 commit afd1125

6 files changed

Lines changed: 8 additions & 20 deletions

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"no-process-exit": 1,
1616
"no-underscore-dangle": 0,
1717
"no-use-before-define": 0,
18+
"no-undef": 2,
1819
"no-unused-vars": 0,
1920
"consistent-return": 0,
2021
"no-inner-declarations": 1,

lib/HotModuleReplacement.runtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
/*global $hash$ installedModules $require$ hotDownloadManifest hotDownloadUpdateChunk modules */
5+
/*global $hash$ installedModules $require$ hotDownloadManifest hotDownloadUpdateChunk hotDisposeChunk modules */
66
module.exports = function() {
77

88
var hotApplyOnUpdate = true;

lib/WebpackOptionsApply.js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -286,16 +286,3 @@ WebpackOptionsApply.prototype.process = function(options, compiler) {
286286
compiler.applyPlugins("after-resolvers", compiler);
287287
return options;
288288
};
289-
290-
function makeRootPlugin(name, root) {
291-
if(typeof root === "string")
292-
return new ModulesInRootPlugin(name, root);
293-
else if(Array.isArray(root)) {
294-
return function() {
295-
root.forEach(function(root) {
296-
this.apply(new ModulesInRootPlugin(name, root));
297-
}, this);
298-
};
299-
}
300-
return function() {};
301-
}

lib/node/NodeMainTemplate.runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
/*global $hotChunkFilename$ hotAddUpdateChunk $hotMainFilename$ */
5+
/*global installedChunks $hotChunkFilename$ hotAddUpdateChunk $hotMainFilename$ */
66
module.exports = function() {
77
function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
88
var chunk = require("./" + $hotChunkFilename$);
@@ -18,7 +18,7 @@ module.exports = function() {
1818
return Promise.resolve(update);
1919
}
2020

21-
function hotDiposeChunk(chunkId) {
21+
function hotDisposeChunk(chunkId) {
2222
delete installedChunks[chunkId];
2323
}
2424
};

lib/node/NodeMainTemplateAsync.runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
/*global $hotChunkFilename$ $require$ hotAddUpdateChunk $hotMainFilename$ */
5+
/*global installedChunks $hotChunkFilename$ $require$ hotAddUpdateChunk $hotMainFilename$ */
66
module.exports = function() {
77
function hotDownloadUpdateChunk(chunkId) { // eslint-disable-line no-unused-vars
88
var filename = require("path").join(__dirname, $hotChunkFilename$);
@@ -34,7 +34,7 @@ module.exports = function() {
3434
});
3535
}
3636

37-
function hotDiposeChunk(chunkId) {
37+
function hotDisposeChunk(chunkId) {
3838
delete installedChunks[chunkId];
3939
}
4040
};

lib/webworker/WebWorkerMainTemplate.runtime.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
MIT License http://www.opensource.org/licenses/mit-license.php
33
Author Tobias Koppers @sokra
44
*/
5-
/*globals hotAddUpdateChunk parentHotUpdateCallback importScripts XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ */
5+
/*globals installedChunks hotAddUpdateChunk parentHotUpdateCallback importScripts XMLHttpRequest $require$ $hotChunkFilename$ $hotMainFilename$ */
66
module.exports = function() {
77
function webpackHotUpdateCallback(chunkId, moreModules) { // eslint-disable-line no-unused-vars
88
hotAddUpdateChunk(chunkId, moreModules);
@@ -49,7 +49,7 @@ module.exports = function() {
4949
};
5050
}
5151

52-
function hotDiposeChunk(chunkId) {
52+
function hotDisposeChunk(chunkId) {
5353
delete installedChunks[chunkId];
5454
}
5555
};

0 commit comments

Comments
 (0)