rizowski / eslint-watch

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

Feature Request: Run only on files that are "dirty" #113

Closed svicalifornia closed 7 years ago

svicalifornia commented 7 years ago

The current single-file mode of eslint-watch only runs on the last file that was saved. This hides errors/warnings on other files that may have been overlooked on previous eslint runs/iterations.

It would be much better to have a mode wherein eslint-watch would parse the results of each run, cache a list of the files with errors/warnings, and include those files in its next run, along with any files that have changed. This mode would cover the known "dirty/broken" files that need to be checked to get back to a known "clean" state.

Environment

rizowski commented 7 years ago

@svicalifornia Thanks for the issue.

This is an interesting idea but I see it being similar to just running eslint-watch without the --changed flag. (It's possible I am missing important differences here. 😄 ) What would this be doing differently in short of esw --watch ? If it is speed you are trying to solve, why is --cached not acceptable? I am looking for a use case that you are running into that could show how this flag is different than what is already available.

svicalifornia commented 7 years ago

Ah… yes, the motivation was speed, and --cache does work pretty well. Closing this issue.