@samitouri / QOS-React / commits / 99171321c3

Lint command fails if there are any warnings (#10572)

You get a lint failure! You get a lint failure! Eeeeverybody gets a lint failure!

Brian Vaughn committed Aug 30, 2017 at 08:03 UTC 99171321c38dd2c1893a7e348b51a725d04e63cb
1 file changed +10 -5
scripts/tasks/eslint.js
+10 -5
@@ -14,14 +14,19 @@ var spawn = require('child_process').spawn;
14
15 var extension = process.platform === 'win32' ? '.cmd' : '';
16
17 -spawn(path.join('node_modules', '.bin', 'eslint' + extension), ['.'], {
18 - // Allow colors to pass through
19 - stdio: 'inherit',
20 -}).on('close', function(code) {
17 +spawn(
18 + path.join('node_modules', '.bin', 'eslint' + extension),
19 + ['.', '--max-warnings=0'],
20 + {
21 + // Allow colors to pass through
22 + stdio: 'inherit',
23 + }
24 +).on('close', function(code) {
25 if (code !== 0) {
26 console.error('Lint failed');
27 + } else {
28 + console.log('Lint passed');
29 }
30
25 - console.log('Lint passed');
31 process.exit(code);
32 });