Skip to content

Commit

Permalink
fix 'no-inner-declarations' warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Tushkiz committed Oct 29, 2016
1 parent 6791adb commit 6b39a53
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions bin/convert-argv.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = function(optimist, argv, convertOptions) {

var i;
if(argv.config) {
function getConfigExtension(configPath) {
var getConfigExtension = function getConfigExtension(configPath) {
for(i = extensions.length - 1; i >= 0; i--) {
var tmpExt = extensions[i];
if(configPath.indexOf(tmpExt, configPath.length - tmpExt.length) > -1) {
Expand All @@ -63,7 +63,7 @@ module.exports = function(optimist, argv, convertOptions) {
return path.extname(configPath);
}

function mapConfigArg(configArg) {
var mapConfigArg = function mapConfigArg(configArg) {
var resolvedPath = path.resolve(configArg);
var extension = getConfigExtension(resolvedPath);
return {
Expand All @@ -88,7 +88,7 @@ module.exports = function(optimist, argv, convertOptions) {
}

if(configFiles.length > 0) {
function registerCompiler(moduleDescriptor) {
var registerCompiler = function registerCompiler(moduleDescriptor) {
if(moduleDescriptor) {
if(typeof moduleDescriptor === "string") {
require(moduleDescriptor);
Expand All @@ -107,7 +107,7 @@ module.exports = function(optimist, argv, convertOptions) {
}
}

function requireConfig(configPath) {
var requireConfig = function requireConfig(configPath) {
var options = require(configPath);
var isES6DefaultExportedFunc = (
typeof options === "object" && options !== null && typeof options.default === "function"
Expand Down Expand Up @@ -538,7 +538,7 @@ module.exports = function(optimist, argv, convertOptions) {
}
ensureObject(options, "entry");

function addTo(name, entry) {
var addTo = function addTo(name, entry) {
if(options.entry[name]) {
if(!Array.isArray(options.entry[name])) {
options.entry[name] = [options.entry[name]];
Expand Down
2 changes: 1 addition & 1 deletion hot/poll.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
if(module.hot) {
var hotPollInterval = +(__resourceQuery.substr(1)) || (10 * 60 * 1000);

function checkForUpdate(fromUpdate) {
var checkForUpdate = function checkForUpdate(fromUpdate) {
if(module.hot.status() === "idle") {
module.hot.check(true).then(function(updatedModules) {
if(!updatedModules) {
Expand Down
2 changes: 1 addition & 1 deletion hot/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
/*globals __resourceQuery */
if(module.hot) {
function checkForUpdate(fromUpdate) {
var checkForUpdate = function checkForUpdate(fromUpdate) {
module.hot.check().then(function(updatedModules) {
if(!updatedModules) {
if(fromUpdate)
Expand Down
4 changes: 2 additions & 2 deletions lib/NormalModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ NormalModule.prototype.build = function build(options, compilation, resolver, fs
_this._cachedSource = null;
if(err) return setError(err);
if(options.module && options.module.noParse) {
function testRegExp(regExp) {
var testRegExp = function testRegExp(regExp) {
return typeof regExp === "string" ?
_this.request.indexOf(regExp) === 0 :
regExp.test(_this.request);
Expand Down Expand Up @@ -267,7 +267,7 @@ NormalModule.prototype.source = function(dependencyTemplates, outputOptions, req
var varStartCode = "";
var varEndCode = "";

function emitFunction() {
var emitFunction = function emitFunction() {
if(varNames.length === 0) return;

varStartCode += "/* WEBPACK VAR INJECTION */(function(" + varNames.join(", ") + ") {";
Expand Down
4 changes: 2 additions & 2 deletions lib/ProgressPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
var doneModules = 0;
var activeModules = [];

function update(module) {
var update = function update(module) {
handler(
0.1 + (doneModules / Math.max(lastModulesCount, moduleCount)) * 0.6,
"building modules",
Expand All @@ -48,7 +48,7 @@ ProgressPlugin.prototype.apply = function(compiler) {
);
}

function moduleDone(module) {
var moduleDone = function moduleDone(module) {
doneModules++;
var ident = module.identifier();
if(ident) {
Expand Down

0 comments on commit 6b39a53

Please sign in to comment.