Skip to content

Commit 6b39a53

Browse files
committed
fix 'no-inner-declarations' warnings
1 parent 6791adb commit 6b39a53

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

bin/convert-argv.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ module.exports = function(optimist, argv, convertOptions) {
5353

5454
var i;
5555
if(argv.config) {
56-
function getConfigExtension(configPath) {
56+
var getConfigExtension = function getConfigExtension(configPath) {
5757
for(i = extensions.length - 1; i >= 0; i--) {
5858
var tmpExt = extensions[i];
5959
if(configPath.indexOf(tmpExt, configPath.length - tmpExt.length) > -1) {
@@ -63,7 +63,7 @@ module.exports = function(optimist, argv, convertOptions) {
6363
return path.extname(configPath);
6464
}
6565

66-
function mapConfigArg(configArg) {
66+
var mapConfigArg = function mapConfigArg(configArg) {
6767
var resolvedPath = path.resolve(configArg);
6868
var extension = getConfigExtension(resolvedPath);
6969
return {
@@ -88,7 +88,7 @@ module.exports = function(optimist, argv, convertOptions) {
8888
}
8989

9090
if(configFiles.length > 0) {
91-
function registerCompiler(moduleDescriptor) {
91+
var registerCompiler = function registerCompiler(moduleDescriptor) {
9292
if(moduleDescriptor) {
9393
if(typeof moduleDescriptor === "string") {
9494
require(moduleDescriptor);
@@ -107,7 +107,7 @@ module.exports = function(optimist, argv, convertOptions) {
107107
}
108108
}
109109

110-
function requireConfig(configPath) {
110+
var requireConfig = function requireConfig(configPath) {
111111
var options = require(configPath);
112112
var isES6DefaultExportedFunc = (
113113
typeof options === "object" && options !== null && typeof options.default === "function"
@@ -538,7 +538,7 @@ module.exports = function(optimist, argv, convertOptions) {
538538
}
539539
ensureObject(options, "entry");
540540

541-
function addTo(name, entry) {
541+
var addTo = function addTo(name, entry) {
542542
if(options.entry[name]) {
543543
if(!Array.isArray(options.entry[name])) {
544544
options.entry[name] = [options.entry[name]];

hot/poll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
if(module.hot) {
77
var hotPollInterval = +(__resourceQuery.substr(1)) || (10 * 60 * 1000);
88

9-
function checkForUpdate(fromUpdate) {
9+
var checkForUpdate = function checkForUpdate(fromUpdate) {
1010
if(module.hot.status() === "idle") {
1111
module.hot.check(true).then(function(updatedModules) {
1212
if(!updatedModules) {

hot/signal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55
/*globals __resourceQuery */
66
if(module.hot) {
7-
function checkForUpdate(fromUpdate) {
7+
var checkForUpdate = function checkForUpdate(fromUpdate) {
88
module.hot.check().then(function(updatedModules) {
99
if(!updatedModules) {
1010
if(fromUpdate)

lib/NormalModule.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ NormalModule.prototype.build = function build(options, compilation, resolver, fs
183183
_this._cachedSource = null;
184184
if(err) return setError(err);
185185
if(options.module && options.module.noParse) {
186-
function testRegExp(regExp) {
186+
var testRegExp = function testRegExp(regExp) {
187187
return typeof regExp === "string" ?
188188
_this.request.indexOf(regExp) === 0 :
189189
regExp.test(_this.request);
@@ -267,7 +267,7 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
267267
var varStartCode = "";
268268
var varEndCode = "";
269269

270-
function emitFunction() {
270+
var emitFunction = function emitFunction() {
271271
if(varNames.length === 0) return;
272272

273273
varStartCode += "/* WEBPACK VAR INJECTION */(function(" + varNames.join(", ") + ") {";

lib/ProgressPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
3838
var doneModules = 0;
3939
var activeModules = [];
4040

41-
function update(module) {
41+
var update = function update(module) {
4242
handler(
4343
0.1 + (doneModules / Math.max(lastModulesCount, moduleCount)) * 0.6,
4444
"building modules",
@@ -48,7 +48,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
4848
);
4949
}
5050

51-
function moduleDone(module) {
51+
var moduleDone = function moduleDone(module) {
5252
doneModules++;
5353
var ident = module.identifier();
5454
if(ident) {

0 commit comments

Comments
 (0)