rizowski / eslint-watch

ESLint with simple watching capabilities
https://www.npmjs.com/package/eslint-watch
MIT License
196 stars 29 forks source link

Add --watch-until-no-errors to continue watching until eslint returns no errors #190

Open bf opened 1 year ago

bf commented 1 year ago

What was the problem/Ticket Number

I only want to re-run eslint and watch files for changes until all errors are resolved. Once all errors are resolved I want to quit watching.

How does this solve the problem?

Adds boolean command line option --watch-until-no-errors default false which is used to exit gracefully when linting returned no errors and watching is enabled.

How to duplicate the issue

you can now use eslint-watch like this:

esw --fix --watch --watch-until-no-errors --ext \".js,.ts,.vue\" --ignore-path .gitignore . && yarn run dev