0

I have the following folders and files:

js/
   lib/
      jQuery.js
   compiled/
      all.js
   file1.js
   file2.js

I want JSHint to lint only file1 and file2 (without having to specify the exact files) and for it not to lint the lib folder and compiled folder.

Can anyone shed any light on why my JSHint task below is linting all .js files and not ignoring the compiled and lib folders?

    jshint: {
        options: {
            jshintrc: '.jshintrc'
        },
        all: [
            'js/**/*.js',
            '!js/compiled/**/*.js',
            '!js/lib/**/*.js'
        ]
    },
ajcw
  • 23,604
  • 6
  • 30
  • 47

1 Answers1

0

Try

jshint: {
    options: {
        jshintrc: '.jshintrc'
    },
    all: [
        'js/*.js',
        '!js/compiled/*.js',
        '!js/lib/*.js'
    ]
},

You don't need the ** as you don't have any intermediate folders.

Sheridan
  • 68,826
  • 24
  • 143
  • 183
Pascal Le Merrer
  • 5,883
  • 20
  • 35