I am running JSHint automatically from a Gruntfile, and would like to exclude my vendor scripts, since lots of them fail JSHint.
How can I do this? At the moment I am running JSHint across anything in /app/scripts/
or any subdirectories.
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: [
'Gruntfile.js',
'<%= yeoman.app %>/scripts/{,*/}*.js'
]
},
I would like to exclude anything in /app/scripts/vendor
. Is this possible?
Just prefix the path with !
to tell minimatch that it is an exclusion; note when doing this order is important.
jshint: {
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
},
all: [
'Gruntfile.js',
'<%= yeoman.app %>/scripts/{,*/}*.js',
'!<%= yeoman.app %>/scripts/vendor/**',
]
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With