-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] lint file with extension other than *.js #42
Comments
+1. I would like to use this extension with typescript |
webcomponents like vue, riot, or polymer, their comp files all includes javascript. FYI. |
I've created a PR that addresses the |
Would love to have this in .vue files |
OK. This was quite some work and basically required to change a lot of things in the LSP as well as the implementation of the ESLint extension. So I would like to find volunteers to test this before I publish this in the market place. Attached a zip that can be installed using vscode command line installer. For example to install the version in VS Code stable download the attached file and rename it to
to install it in VS Code stable use
To control the file types to be validated use the new settings "eslint.validate": [
"javascript", "javascriptreact", "html"
] Please note that you need to configure ESLint accordingly as well to make this work. The extension will not automatically install eslint plugins. So you need to have a "plugins": [
"html"
] section in the ESLint configuration file and need to install |
One additional note: due to BenoitZugmeyer/eslint-plugin-html#38 auto fix is not available for files other than JS. |
Actually dups #21. |
It works like a charm for me (VS Code 1.7.2, Win10). Using in .vue files, as easy as adding .vue extension to eslint.validate (had eslint-plugin-html installed previously): "eslint.validate": [
"javascript",
"javascriptreact",
"html",
"vue"
] Thank you @dbaeumer ! 😄 |
Gave it a spin on VSC 1.7.2, OSX Sierra, works like a charm! |
I tested here on VSC 1.7.2, Linux Debian 64 bits, works perfectly!!! Thanks a lot!!! Great job!!! |
Tested on VSC 1.7.2 OSX Sierra, works on .vue files 👍 |
Tested on VSC 1.7.2, Windows 7 64 bit, works on .html files. When can we expect an official plugin update? |
@sz332 in the next days. |
Tested on VSC 1.7.2 OSX Sierra, with the graphql plugin and it worked well. Only requirement was that a language service for graphql needed to be installed so that the language id could be picked up. |
@sebastiandedeyne That might be a bug in |
@sebastiandedeyne very strange. Do you have a project / sample you can share. Helps understanding what is going wrong @sz332 release eslint 1.2.1 today. |
For those that helped me testing please uninstall and reinstall the eslint plugin since the plugin will not update itlsef anymore if directly installed from a vsix. For the details see microsoft/vscode#17290. I apologize for the inconvenience this causes. |
@dbaeumer testing on Windows 10 with insider 1.11 and TypeScript and seems to be working fine. What else is needed to have this in the official release? |
@molant nothing. I simply forgot to close the issue. |
It wasn't working with the latest version of the plugin and that's how I end up in this issue. Is it going to be available in the next one or is there something broken with my current configuration? |
@molant it should work with the latest version, however you need to configure this. Please see: https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint |
Same issue here, anyone will help? |
ESlint autofix doesn't seem to work for me. |
@codeofsumit Hi, "eslint.validate": [
"javascript",
"javascriptreact",
{ "language": "vue", "autoFix": true },
{ "language": "html", "autoFix": true }
] refered here #185 |
Hey guys, With the latest version of VS Code, I'm still not able to lint Vue files. If you pull down this simple example here: https://github.com/prograhammer/hello Here's my settings.json:
|
Solved! My settings.json was incorrect. Updated to be like this now:
Works beautifully! |
I'm still experiencing this problem. Is any official solution? |
Linting for vue started working for me with setup from the comment above: #42 (comment) |
Please note that You can add settings below to support typescript-eslint-parser "eslint.validate": [
"javascript",
"javascriptreact",
"html",
"typescript",
"typescriptreact"
] |
Currently the plugin only watch js files:
documentSelector: ['javascript', 'javascriptreact'],
It would be nice if we can lint other file types, like *.html. eslint has many plugins that can support extracting javascript from other format, like html.
Atom's eslint plugin, has this option:
The text was updated successfully, but these errors were encountered: