'use strict';

module.exports = function(grunt) {


    // Project configuration.
    grunt.initConfig({

        files: {
            lib: ['lib/**/*.js'],
            bin: ['bin/*'],
            config: ['config/**/*'],
            tests: ['test/**/*.js'],
            gruntfile: ['Gruntfile.js'],

            // Composites of above
            src: ['lib/**/*.js', 'bin/*', 'test/**/*.js'],
            all: ['lib/**/*.js', 'bin/*', 'config/**/*', 'test/**/*.js', 'Gruntfile.js']
        },

        // Set Environment
        env: {
            test: {
                NODE_ENV: 'test'
            }
        },

        // Maybe remove this, istanbul covers it nicely
        mochaTest: {
            options: {
                reporter: 'spec'
            },
            src: '<%= files.tests %>'
        },


        // Istanbul code coverage
        mocha_istanbul: {
            coverage: {
                src: '<%= files.tests %>',
                options: {
                    coverageFolder: 'coverage'
                }
            }
        },

        // Run jshint
        jshint: {
            options: {
                reporter: require('jshint-stylish'),
                jshintrc: '.jshintrc',

            },
            all: {
                src: '<%= files.all %>'
            }
        },


        // run jshint/tests/coverage when anything changes
        watch: {
            all: {
                files: '<%= files.all %>',
                tasks: ['coverage']
            }
        },

        // restart the server when anything changes
        nodemon: {
            dev: {
                script: 'bin/flowTrack',
                ignore: ['node_modules/**', 'test/coverage/**'],
                delay: 4000
            }
        }
    });

    // These plugins provide necessary tasks.
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-mocha-test');
    grunt.loadNpmTasks('grunt-mocha-istanbul');
    grunt.loadNpmTasks('grunt-nodemon');
    grunt.loadNpmTasks('grunt-env');

    // Default task.
    grunt.registerTask('default', ['env:test', 'jshint']);
    grunt.registerTask('coverage', ['env:test', 'jshint', 'mocha_istanbul:coverage']);
    grunt.registerTask('test', ['env:test', 'mochaTest']);

};
@@ -1290,32 +1290,104 @@
 '%0A            %7D%0A
+            jshintrc: %7B%0A                src: '.jshintrc'%0A            %7D,%0A
         %7D,%0A%0A%0A   
@@ -1557,16 +1557,125 @@
 erage'%5D%0A
+            %7D,%0A            jshintrc: %7B%0A                files: '.jshintrc',%0A                tasks: %5B'jshint'%5D%0A
         
@@ -2336,16 +2336,20 @@
  'jshint
+:all
 '%5D);%0A   
@@ -2400,16 +2400,20 @@
  'jshint
+:all
 ', 'moch

Add a task to watch jshintrc