Skip to content

Commit

Permalink
Fix the plugin not finishing in some cases
Browse files Browse the repository at this point in the history
Fixes #172
  • Loading branch information
sindresorhus committed Dec 4, 2022
1 parent 259ce5c commit 1322e30
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = grunt => {

if (this.filesSrc.length === 0) {
grunt.log.writeln(chalk.magenta('Could not find any files to validate'));
return true;
done(true);
return;
}

const engine = new ESLint(options);
Expand All @@ -34,7 +35,8 @@ module.exports = grunt => {

if (!formatter) {
grunt.warn(`Could not find formatter ${format}`);
return false;
done(false);
return;
}

let results = await engine.lintFiles(this.filesSrc);
Expand Down

0 comments on commit 1322e30

Please sign in to comment.