aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Sanders <ejsanders@gmail.com>2020-04-21 12:43:52 +0100
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-07-27 21:14:05 +0200
commita22b43bad41592ec61e5fa0fcd2b3a3d44f8bfd3 (patch)
tree27c3fc7a661cbd5d5fbaeeed6996d31ac07f2ee0
parente7b3bc488d01d584262e12a7c5c25f935d0d034b (diff)
downloadjquery-a22b43bad41592ec61e5fa0fcd2b3a3d44f8bfd3.tar.gz
jquery-a22b43bad41592ec61e5fa0fcd2b3a3d44f8bfd3.zip
Build: Append .eslintignore paths to grunt eslint paths
This allows us to turn off the `quiet` option which was suppressing warnings. We can also set `maxWarnings` to 0 now that aren't any. Closes gh-4689
-rw-r--r--Gruntfile.js20
1 files changed, 15 insertions, 5 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
index 43507c24b..5021c59e9 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -15,7 +15,8 @@ module.exports = function( grunt ) {
var fs = require( "fs" ),
gzip = require( "gzip-js" ),
isTravis = process.env.TRAVIS,
- travisBrowsers = process.env.BROWSERS && process.env.BROWSERS.split( "," );
+ travisBrowsers = process.env.BROWSERS && process.env.BROWSERS.split( "," ),
+ CLIEngine = require( "eslint" ).CLIEngine;
if ( !grunt.option( "filename" ) ) {
grunt.option( "filename", "jquery.js" );
@@ -77,9 +78,7 @@ module.exports = function( grunt ) {
},
eslint: {
options: {
-
- // See https://github.com/sindresorhus/grunt-eslint/issues/119
- quiet: true
+ maxWarnings: 0
},
// We have to explicitly declare "src" property otherwise "newer"
@@ -88,7 +87,18 @@ module.exports = function( grunt ) {
src: [ "dist/jquery.js", "dist/jquery.min.js" ]
},
dev: {
- src: [ "src/**/*.js", "Gruntfile.js", "test/**/*.js", "build/**/*.js" ]
+ src: [
+ "src/**/*.js",
+ "Gruntfile.js",
+ "test/**/*.js",
+ "build/**/*.js",
+
+ // Ignore files from .eslintignore
+ // See https://github.com/sindresorhus/grunt-eslint/issues/119
+ ...new CLIEngine()
+ .getConfigForFile( "Gruntfile.js" )
+ .ignorePatterns.map( ( p ) => `!${ p }` )
+ ]
}
},
testswarm: {