Skip to content

Commit

Permalink
Use validateWarnings when reporting linc command
Browse files Browse the repository at this point in the history
  • Loading branch information
HeroProtagonist committed Nov 27, 2017
1 parent c56595f commit 8c9784f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/tasks/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

'use strict';

const lintOnFiles = require('../eslint');
const {lintOnFiles} = require('../eslint');
const report = lintOnFiles(['.']);
if (report.errorCount > 0 || report.warningCount > 0) {
console.log('Lint failed.');
Expand Down
4 changes: 2 additions & 2 deletions scripts/tasks/linc.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

'use strict';

const lintOnFiles = require('../eslint');
const {lintOnFiles, validWarnings} = require('../eslint');
const listChangedFiles = require('../shared/listChangedFiles');

const changedFiles = [...listChangedFiles()];
const jsFiles = changedFiles.filter(file => file.match(/.js$/g));

const report = lintOnFiles(jsFiles);
if (report.errorCount > 0 || report.warningCount > 0) {
if (report.errorCount > 0 || validWarnings(report)) {
console.log('Lint failed for changed files.');
process.exit(1);
} else {
Expand Down

0 comments on commit 8c9784f

Please sign in to comment.