diff --git a/.jshintrc b/.jshintrc index fc19146..507f912 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,13 +1,14 @@ { + "boss": true, "curly": true, "eqeqeq": true, + "eqnull": true, "immed": true, "latedef": true, "newcap": true, "noarg": true, + "node": true, "sub": true, "undef": true, - "boss": true, - "eqnull": true, - "node": true -} \ No newline at end of file + "unused": true +} diff --git a/tasks/lib/taskrun.js b/tasks/lib/taskrun.js index 822fc14..9da8cea 100644 --- a/tasks/lib/taskrun.js +++ b/tasks/lib/taskrun.js @@ -2,20 +2,14 @@ * grunt-contrib-watch * http://gruntjs.com/ * - * Copyright (c) 2014 "Cowboy" Ben Alman, contributors + * Copyright (c) 2015 "Cowboy" Ben Alman, contributors * Licensed under the MIT license. */ 'use strict'; -var path = require('path'); -var EE = require('events').EventEmitter; -var util = require('util'); - module.exports = function(grunt) { - var livereload = require('./livereload')(grunt); - // Create a TaskRun on a target function TaskRun(target) { this.name = target.name || 0; diff --git a/tasks/watch.js b/tasks/watch.js index 547b0b0..9c82dcb 100644 --- a/tasks/watch.js +++ b/tasks/watch.js @@ -82,7 +82,7 @@ module.exports = function(grunt) { // initialize taskrun var targets = taskrun.init(name, {target: target}); - targets.forEach(function(target, i) { + targets.forEach(function(target) { if (typeof target.files === 'string') { target.files = [target.files]; } // Process into raw patterns diff --git a/test/tasks/livereload_test.js b/test/tasks/livereload_test.js index 67c8328..5ab7523 100644 --- a/test/tasks/livereload_test.js +++ b/test/tasks/livereload_test.js @@ -176,7 +176,7 @@ exports.livereload = { var cwd = path.resolve(fixtures, 'livereload'); var assertWatch = helper.assertTask(['watch', '-v'], {cwd: cwd}); assertWatch([function() { - request(35729, function(data) { + request(35729, function() { grunt.file.write(path.join(cwd, 'sass', 'one.scss'), '#one {}'); }); }], function(result) { @@ -194,7 +194,7 @@ exports.livereload = { var cwd = path.resolve(fixtures, 'livereload'); var assertWatch = helper.assertTask(['watch:livereloadOnErrorTrue', '-v'], {cwd: cwd}); assertWatch([function() { - request(35729, function(data) { + request(35729, function() { grunt.file.write(path.join(cwd, 'lib', 'one.js'), 'var one = true;'); }); }], function(result) { @@ -209,7 +209,7 @@ exports.livereload = { var cwd = path.resolve(fixtures, 'livereload'); var assertWatch = helper.assertTask(['watch:livereloadOnErrorFalse', '-v'], {cwd: cwd}); assertWatch([function() { - request(35729, function(data) { + request(35729, function() { grunt.file.write(path.join(cwd, 'lib', 'one.js'), 'var one = true;'); }); }], function(result) { @@ -225,7 +225,7 @@ exports.livereload = { var cwd = path.resolve(fixtures, 'livereload'); var assertWatch = helper.assertTask(['watch:livereloadOnErrorFalseNoSpawn', '-v'], {cwd: cwd}); assertWatch([function() { - request(35729, function(data) { + request(35729, function() { grunt.file.write(path.join(cwd, 'lib', 'one.js'), 'var one = true;'); }); }], function(result) {