run a script on file change

Retour

generic solution

apt install inotify-tools
while inotifywait -e close_write container.js; do eslint container.js; done;

dedicated to eslint

npm i -g eslint eslint-watch
esw -w container.js