File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,13 @@ Default: `-1` *(means no limit)*
93
93
94
94
Number of warnings to trigger non-zero exit code.
95
95
96
+ ### failOnError
97
+
98
+ Type: ` boolean ` <br >
99
+ Default: ` true `
100
+
101
+ Fail the build if ESLint found any errors.
102
+
96
103
97
104
## License
98
105
Original file line number Diff line number Diff line change @@ -7,7 +7,8 @@ module.exports = grunt => {
7
7
const opts = this . options ( {
8
8
outputFile : false ,
9
9
quiet : false ,
10
- maxWarnings : - 1
10
+ maxWarnings : - 1 ,
11
+ failOnError : true ,
11
12
} ) ;
12
13
13
14
if ( this . filesSrc . length === 0 ) {
@@ -56,6 +57,6 @@ module.exports = grunt => {
56
57
grunt . warn ( `ESLint found too many warnings (maximum: ${ opts . maxWarnings } )` ) ;
57
58
}
58
59
59
- return report . errorCount === 0 ;
60
+ return opts . failOnError ? report . errorCount === 0 : 0 ;
60
61
} ) ;
61
62
} ;
You can’t perform that action at this time.
0 commit comments