Closed robchristian closed 5 years ago
🤔 Huh I'll have to look into that when I get a chance. I agree with you, it shouldn't remove color when running through esw. It also shouldn't be duplicating errors.
Thanks.
Also,
for me simply using --color -w
reproduces the issue
I've been running into a similar issue and I figured our by running esw
with DEBUG=esw:*
that this was in fact caused by using simultaneously --cache
and -w
:
esw:events:watch Detected change: .eslintcache +826ms
esw:eslint Executing [ '--cache', '--ext', [ '.json', '.js', '.html' ], '--eslintrc', '--ignore', '--inline-config', '.' ] +0ms
esw:events:watch Detected change: .eslintcache +708ms
esw:eslint Executing [ '--cache', '--ext', [ '.json', '.js', '.html' ], '--eslintrc', '--ignore', '--inline-config', '.' ] +0ms
I fixed it by changing my eslint-watch command to esw --cache -w --color src/
instead of esw --cache -w --color .
EDIT: actually, using --watch-ignore '/.git|node_modules|.eslintcache/'
does the same job
Environment
Basic Description of the problem
My team runs eslint with color output. Upon switching to eslint-watch, color was gone (we have an
.eslintrc.json
, I would expect esw to not change the behavior of eslint output). Upon adding--color
and--clear
(because obviously we want the terminal to clear, reviewing errors should not require extra focus), the terminal clears but it now logs errors in duplicate or triplicate, maybe even more.How to reproduce it
from our package.json:
--color
and--clear
seem to be the main factors. Changing their order hasn't had much effect.Our
eslintrc.json
:Debug output:
I probably can't include this for you, since the output contains a lot of filepaths from a private, for-profit, project.