-
Notifications
You must be signed in to change notification settings - Fork 2
Support additional file types #9
Comments
Slightly more complicated than I was expecting - merely adding html as a filetype breaks things (probably because it doesn't use the right parser). We might need something in the eslint runner to load configuration for a specific file (possibly through #10). |
I would really like to give you a hand but I'm not aware of the big picture of ESLint, if I'll find time to give it a look I'll do my best to help on this! 💪 |
Hi @apexskier |
Last I tried this broke for html files in a non-vue project. |
What kind of broke? I would like to try and see |
I'm seeing a parsing error in my test html file. (code is here) |
I found one issue (although I suspect there'll be another) - the |
Fixed that, but the next issue is that parsing won't work unless you have the extension installed that sets up parsing for the custom file types (so you'll get warnings like this). |
It looks like the vscode extension might be checking configured plugins to determine file type support -https://github.com/microsoft/vscode-eslint/blob/31b3f27aaf6d6f9c47c7395f0cb5e976ed0e54cd/server/src/eslintServer.ts#L648 |
Is this a 'closed won't fix'? I would love some es-lint happening in script blocks of |
Nope, support has been added, see the linked PR. |
https://discord.com/channels/756815974128418817/756817436363194401/756878326404087908
Currently, this extension is limited to only javascript, typescript, jsx, and tsx files. Eslint can operate on other types, such as vue, html, etc when used with plugins (see eslint/rfcs#20). This plugin should have parity with eslint's core features.
Unfortunately, since command applicable syntax is currently static in the extension manifest, this is "all or nothing" for commands and can't easily be user configured. We can support dynamic user configuration for inline functionality though.
VSCode's plugin appears to default to checking html and vue, so it's probably acceptable to do that here as well.
The text was updated successfully, but these errors were encountered: