Closed DavidNeufeld closed 6 years ago
This is due to the following line: https://github.com/michaelgmcd/vscode-language-babel/blob/master/package.json#L52
I don't think this a very common file extension, so I'm sure I could remove it and address this if it becomes a problem again.
Fixed in #16
On both my Windows 10 and Linux (Ubuntu 17.04) 64-bit systems, any file with a name ending in "es" is considered a JavaScript file when the Babel Javascript extension is installed in VS Code.
I encountered this when examining the Linux /etc/interfaces file in VS Code under an Ubuntu 17.04 VM running in VirtualBox on a Windows 10 host. Weird to see the JS icon in the title of the file tab, and super annoying to be getting a bunch of [JS] and [JSHINT] errors/warnings, when it's not a javascript file. The problem would happen no matter where I had an "interfaces" file on both Windows and Linux installs of VS Code.
Excluding files without extensions from jshint by adding
"jshint.exclude": {"!(*.*)":true}
to my VS Code User settings, only got rid of the [JSHINT] problems. [JS] errors remained.Disabled all VS Code Extensions and the problem went away. A-ha! Process of elimination indicated Babel JavaScript as the culprit. JShint may also be similarly borked, but I haven't investigated that yet due to my User Setting workaround.
Initially I though it had to do with file names with no extensions, but other files without extensions didn't report as JS files. After playing around with the "interface" filename I reduced the problem to file names ending in "es", "ES", "eS" and "Es". Whew.
Please fix.