kmagiera / babel-watch

Reload your babel-node app on JS source file changes. And do it fast.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lint before you reload babel script

mehtapratik opened this issue · comments

This isn't a bug but a possible feature addition. Let me know if there is different forum to discuss such matter.

I want to run eslint every time babel-watch reloads my app. Instead of running linter separately or running it during build time, fixing linting error will be relatively easier during each babel-watch reload.

I don't think this is possible to achieve using babel-watch. I can achieve this with @babel/node and nodemon in following manner:

"scripts": {
      "dev": "npm run lint && babel-node ./src/server.js",
      "start": "nodemon --watch ./src/* --exec npm run dev"
   }

Is this possible using babel-watch? If not, can we add such feature?

Now supported in 7.3.0.

babel-watch --before-restart="npm run lint" app.js