title: how to do linting using nodemon?
body: <p>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.</p>
  
  <p><a href="https://github.com/remy/nodemon#pipe-output-to-somewhere-else" rel="noreferrer">The output from nodemon can be piped</a>. I want to use this for linting the changed file using eslint.</p>
  
  <p>Here is my package.json</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "name": "app",
    "version": "0.0.1",
    "private": true,
    "scripts": {
      "start": "nodemon server.js",
      "lint": "eslint"
    },
    "dependencies": {
      "MD5": "*",
      "clean-css": "*",
      "express": "~4.9.0",
      "express-handlebars": "~2.0.1",
      "express-redis-cache": "*",
      "foundation-sites": "~5.5.3",
      "fs-extra": "~0.8.1",
      "node-rest-client": "~1.5.1",
      "node-sass": "*",
      "path": "*"
    },
    "devDependencies": {
      "babel-eslint": "^4.1.6",
      "eslint": "^1.10.3",
      "eslint-config-airbnb": "^2.1.1",
      "eslint-config-airbnb-es5": "^1.0.8",
      "eslint-plugin-react": "^3.13.1",
      "nodemon": "~1.8.1",
      "parallelshell": "~2.0.0",
      "watch": "~0.17.1"
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>I tried this. But it doesn't work.It gives error.</p>
  
  <pre><code>       "scripts": {
      "start": "nodemon({ script: 'server.js' }).on('restart', function () {console.log('nodemon started');}).on('crash', function () {console.log('script crashed for some reason');});",
      "lint": "eslint"
    },
  </code></pre>