title: ESLint - Prevent importing unpublished module files
body: <p><code>mymodule/package.json</code>:</p>
  
  <pre><code>{
    "name": "mymodule",
    "version": "1.0.0",
    "main": "./src/index.js"
  }
  </code></pre>
  
  <p><code>myapp/app.js</code></p>
  
  <p>allow this</p>
  
  <pre><code>import 'mymodule'
  </code></pre>
  
  <p>Disallow this</p>
  
  <pre><code>import 'mymodule/src/_private.js'
  </code></pre>
  
  <p>Can this be done via eslint?</p>
  
  <p>I found this module but it seems to be doing something related but not exactly the same. <a href="https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md" rel="nofollow">https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md</a></p>