title: How to load an external file inside npm script?
body: <p><strong>PURPOSE: To test the linting of only some of the components in my source and not all the files.</strong></p>
  
  <p>I am trying to execute a command on all the folders inside a config file :</p>
  
  <pre><code>    //package.json
      "scripts": {
      "lint1": "eslint src/actions"
      "lint2": "eslint src/components/component1"
      "lint3": "eslint src/components/component2"
      ....
      }
  </code></pre>
  
  <p>Instead of having multiple commands for each folder, I want my npm script to load all the required folder paths from an external config file(something like below) and iteratively run the lint for each of those paths in one command.</p>
  
  <pre><code>//config.js
  paths = [
  'src/actions',
  'src/components/component1',
  'src/components/component2',
  'src/components/component3',
  ]
  </code></pre>
  
  <p>How to do this ? or any better way to do it using npm?</p>
  
  <p><strong>PS: I dont want to do it the other way around by putting the unwanted paths in eslintignore.js file</strong></p>