Trying to find out why eslint-watch does not work with proper docker layout

I'm trying to get my front-end to work on docker on the last day, and I narrowed down some irregular behavior on eslint-watch and docker. I restored the minimum working repo of the error that I encountered.

It seems that linting is somehow hit when using docker-compose ( docker-compose up in particular, docker-compose run seems to work fine). Rather, the last console log entries are staggered. I'm not sure what it is, but from my reading the best interpretation I can give is that the log messages that need to be printed for iteration, for some reason, do not exit the node message queue.

I narrowed down the printing of the message in the eslint watcher file. If I add more console logs at the end of this method, it crosses out the listing, but it breaks my logs (i.e., Recent logs in execution). It's funny if I save again, it clears the remaining message queue, that is, previous logs are printed.

To replicate, download my repo, run docker-compose up and edit the test.js file and save. Follow the logs in your terminal for listing. You will see what I mean.

I hope this is quite descriptive, this is a really strange mistake and hard to explain in the question.

Any ideas how I can figure this out?

+5
source share
1 answer

Finally figured it out. All of this was the culprit. Very strange.

Anyway, I used iTerm2 3.0.9. It seems that in iTerm2 3.0.12 (OS 10.8+) this bug is fixed.

https://github.com/rizowski/eslint-watch/issues/94#issuecomment-261287265

0
source

Source: https://habr.com/ru/post/1259910/


All Articles