grunt-newer: Running 'grunt newer:jshint' causes the full jshint task to run

I setup my jshint configuration as so:

jshint: {
   src: ['<%= jsPath %>/*.js', '<%= jsPath %>/app/**/*.js', '<%= jsPath %>/nls/**/*.js'],
    options: {
        'browser': true,
                'undef': true
    }
}

Then I tried to run grunt newer:jshint and got the following output:

Running "newer:jshint" (newer) task

Running "newer:jshint:src" (newer) task

Running "jshint:src" (jshint) task
>> 111 files lint free.

Running "newer-postrun:jshint:src:1:node_modules/grunt-newer/.cache" (newer-postrun) task

Done, without errors.

I have ran it a number of times and the same output occurs, I thought it would only lint files that changed after the first run?

About this issue

  • Original URL
  • State: open
  • Created 10 years ago
  • Reactions: 4
  • Comments: 17 (3 by maintainers)

Most upvoted comments

I found grunt-newer worked if I did

        // JSHint checking of the JS app files
        jshint :
        {
            all : {
                files : ['Gruntfile.js', 'media/js/app/**/*.js'],
            },
            options : {
                jshintrc : '.jshintrc'
            }
        },

but not for

        // JSHint checking of the JS app files
        jshint :
        {
            all : ['Gruntfile.js', 'media/js/app/**/*.js'],
            options : {
                jshintrc : '.jshintrc'
            }
        },

It seems to only understand one syntax for files but grunt supports multiple ways of specifying.

Issue opened since 2014. Any news?