title: How to tell eslint to: disable next line "'import' and 'export' may appear only with 'sourceType: module'"
body: <p>How to tell eslint to: disable next line  for</p>
  
  <blockquote>
    <p>"'import' and 'export' may appear only with 'sourceType: module'"</p>
  </blockquote>
  
  <p><em>Without</em> <a href="https://eslint.org/docs/user-guide/configuring#specifying-parser-options" rel="nofollow noreferrer">configuration</a>, <strong>it has to be inline</strong>.</p>
  
  <p>The following doesn't seem to be working</p>
  
  <pre class="lang-js prettyprint-override"><code>/* eslint-disable */
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// eslint-disable-next-line
  </code></pre>
  
  <p>Why:  </p>
  
  <p>Let's say you are writing a test inside a NON module project, and you want to prove you can or cannot dynamically import an ESM module.  </p>
  
  <pre class="lang-js prettyprint-override"><code>describe('my test', it("doesn't work", ()=&gt; require('./my.esm.js'))
  </code></pre>
  
  <p>Where 'my.esm.js' could be </p>
  
  <pre class="lang-js prettyprint-override"><code>export function noop {}
  </code></pre>
  
  <p>...or whatever </p>
  
  <p>But the main project, nor the tests are module based.</p>