title: How to make eslint work for the whole directory in Node js
body: <p>I am trying to check linting errors in my node js application and then start the server.</p>
  
  <pre><code>  "scripts": {
      "lint": "eslint .",
      "pretest": "eslint **/*.js",
      "start": "node .",
      "posttest": "npm run lint &amp;&amp; nsp check"
    }
  </code></pre>
  
  <p>npm run pretest never checks the whole directory set . It i do a npm run lint . It gives me weird errors like</p>
  
  <pre><code>Cannot find module 'eslint-config-medikoo-es5'
  Referenced from: /home/rahul/DSP/dsp-api/server/node_modules/es5-ext/package.json
  Error: Cannot find module 'eslint-config-medikoo-es5'
  Referenced from: /home/rahul/DSP/dsp-api/server/node_modules/es5-ext/package.json
      at ModuleResolver.resolve (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/util/module-resolver.js:74:19)
      at resolve (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:515:25)
      at load (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:532:26)
      at configExtends.reduceRight (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:424:36)
      at Array.reduceRight (native)
      at applyExtends (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:408:28)
      at Object.load (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:566:22)
      at loadConfig (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config.js:63:33)
      at getLocalConfig (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config.js:130:29)
      at Config.getConfig (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config.js:260:26)
  </code></pre>
  
  <p>and if i install that dependency i am stuck at this </p>
  
  <pre><code>Cannot find module '@ljharb/eslint-config'
  Referenced from: /home/rahul/DSP/dsp-api/server/node_modules/express/node_modules/qs/.eslintrc
  Error: Cannot find module '@ljharb/eslint-config'
  Referenced from: /home/rahul/DSP/dsp-api/server/node_modules/express/node_modules/qs/.eslintrc
      at ModuleResolver.resolve (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/util/module-resolver.js:74:19)
      at resolve (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:515:25)
      at load (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:532:26)
      at configExtends.reduceRight (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:424:36)
      at Array.reduceRight (native)
      at applyExtends (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:408:28)
      at Object.load (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config/config-file.js:566:22)
      at loadConfig (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config.js:63:33)
      at getLocalConfig (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config.js:130:29)
      at Config.getConfig (/home/rahul/DSP/dsp-api/node_modules/eslint/lib/config.js:260:26)
  </code></pre>
  
  <p>Please help</p>