title: npm: how to run test & lint on each change?
body: <p>I am using a bare <code>npm</code> ( no <code>grunt</code>/<code>gulp</code>) approach to develop my new MEAN project.<br>
  My config is like the following:</p>
  
  <p>File <em>package.json:</em></p>
  
  <pre><code>...
  "start": "nodemon ./bin/www",
  "lint": "jshint **/*.js",
  "test": "mocha --recursive",
  "dependencies": {
    ...
  },
  "devDependencies": {
    ...
  },
  </code></pre>
  
  <p>Before starting, I run an <code>npm start</code> and <code>nodemon</code> starts monitoring my project tree for changes, triggering a restart after each source file change.<br>
  So far so good.</p>
  
  <p>But what if I'd like to include - say - the <code>lint</code> and/or the <code>test</code> stages on each restart?<br>
  I didn't find any clue nor in the <a href="https://github.com/remy/nodemon" rel="nofollow">nodemon</a> page nor in the <a href="https://github.com/npm/npm" rel="nofollow">npm</a> one...</p>