how to do linting using nodemon?

后端 未结 3 961
醉酒成梦
醉酒成梦 2021-02-07 14:49

Can I use nodemon to lint my javascript? I am not using any build tool e.g. gulp or grunt and want to maximize the use of node and npm.

The output from nodemon can be pi

3条回答
  •  礼貌的吻别
    2021-02-07 15:00

    You can use the exec option of nodemon to run your tests as you save code. Here's an example:

    nodemon server.js --exec 'npm run test && node'
    

    This will cause nodemon to run npm run test && node server.js, and it won't start the server until all the tests have run successfully.

提交回复
热议问题