Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

done() should be called when there are not files to validate or formatter is not found #172

Closed
MarioRomanDono opened this issue Dec 3, 2022 · 0 comments

Comments

@MarioRomanDono
Copy link

In the 24.0.0 version, the 'eslint' task has been changed to be executed asynchronously. However, if there are no files to validate or if the formatter cannot be found, instead of using done(true) or done(false), the value is returned directly.

if (this.filesSrc.length === 0) {
grunt.log.writeln(chalk.magenta('Could not find any files to validate'));
return true;
}
const engine = new ESLint(options);
const formatter = await engine.loadFormatter(format);
if (!formatter) {
grunt.warn(`Could not find formatter ${format}`);
return false;
}

This causes, at least in my case, the task to get stuck. If you consider this to be a valid issue, I'll be happy to make a pull request with the change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant