diff --git a/gulpfile.js b/gulpfile.js index a9dc1c2..ba7b7da 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -22,5 +22,5 @@ gulp.task('test', ['lint'], function (done) { m.addFile(__dirname + '/test/specs/index.js'); - m.run().on('end', done); -}); \ No newline at end of file + m.run(done); +}); diff --git a/package.json b/package.json index 25de5d1..cd077ad 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,14 @@ "dependencies": { "gulp-util": "^3.0.0", "jshint": "^2.5.6", - "lodash": "^2.4.1", - "minimatch": "^1.0.0", + "lodash": "^3.0.1", + "minimatch": "^2.0.1", "rcloader": "^0.1.2", "through2": "~0.6.1" }, "devDependencies": { - "gulp": "~3.8.10", - "mocha": "^1.18.2", + "gulp": "^3.8.10", + "mocha": "^2.1.0", "should": "^4.0.4" }, "scripts": { diff --git a/src/lint.js b/src/lint.js index d489193..f402ea4 100644 --- a/src/lint.js +++ b/src/lint.js @@ -42,15 +42,15 @@ module.exports = function createLintFunction(userOpts) { } if (cfg.overrides) { - _.each(cfg.overrides, function (options, pattern) { + _.forEach(cfg.overrides, function (options, pattern) { if (!minimatch(file.path, pattern, { nocase: true, matchBase: true })) return; if (options.globals) { - globals = _.extend(globals, options.globals); + globals = _.assign(globals, options.globals); delete options.globals; } - _.extend(cfg, options); + _.assign(cfg, options); }); delete cfg.overrides;