<p dir="auto">When I open any file in my ES6 Javascript project, every single line is underlined in red, with errors like:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/79215/11252725/88d3c130-8dec-11e5-9b18-3f5bc4337bfe.png"><img src="https://cloud.githubusercontent.com/assets/79215/11252725/88d3c130-8dec-11e5-9b18-3f5bc4337bfe.png" alt="screen shot 2015-11-18 at 12 03 09 pm" style="max-width: 100%;"></a></p>
<p dir="auto">In my project's root, I have a <code class="notranslate">jsconfig.json</code> file with the following contents:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;compilerOptions&quot;: {
        &quot;target&quot;: &quot;ES6&quot;,
        &quot;module&quot;: &quot;commonjs&quot;
    },
    &quot;files&quot;: [
        &quot;app/&quot;
    ]
}"><pre class="notranslate"><code class="notranslate">{
    "compilerOptions": {
        "target": "ES6",
        "module": "commonjs"
    },
    "files": [
        "app/"
    ]
}
</code></pre></div>
<p dir="auto">The file in question lives inside the <code class="notranslate">app</code> folder.</p>
<p dir="auto">I am incorrectly getting the following error, <strong>"This can only be used with ES6. Make sure to have a jsconfig.json-file which sets the target to ES6"</strong>.</p>
<p dir="auto">Furthermore, I think I may have stumbled upon a weird case where if the start of the file name is "temp" as in "temp.js", "temporary.js", or "temp123.js" it will cause this error.</p>
<p dir="auto">To reproduce:<br>
Create a file called temp.js with some ES6 code, such as:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="let x = 10"><pre class="notranslate"><code class="notranslate">let x = 10
</code></pre></div>
<p dir="auto">The above error is now showing. To fix it, create the jsconfig.json file which sets the target to ES6:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;compilerOptions&quot;: {
        &quot;target&quot;: &quot;ES6&quot;
    }
}"><pre class="notranslate"><code class="notranslate">{
    "compilerOptions": {
        "target": "ES6"
    }
}
</code></pre></div>
<p dir="auto">The error is still showing, now incorrectly.</p>
<p dir="auto">If I rename "temp.js" to "test.js" (or anything that doesn't start with 'temp') the error goes away. Or, if I create a files array in jsconfig.json which lists "temp.js", the error goes away:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;compilerOptions&quot;: {
        &quot;target&quot;: &quot;ES6&quot;
    },
    &quot;files&quot;: [
        &quot;temp.js&quot;
    ]
}"><pre class="notranslate"><code class="notranslate">{
    "compilerOptions": {
        "target": "ES6"
    },
    "files": [
        "temp.js"
    ]
}
</code></pre></div>
<p dir="auto">I don't want to have to do this for every file in my project.</p>
<p dir="auto">I'm running on Windows 7, 64-bit.</p>
<p dir="auto">Thanks</p>