-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
Self-closing tags error #257
Comments
We are incorporating https://github.com/vuejs/eslint-plugin-vue now and this comes from its rule: So create a |
Took me a few tries to figure out how to write the rule, so for posterity, this worked for me: {
"plugins": [
"vue"
],
"rules": {
"vue/html-no-self-closing": 0
}
}
|
Hmm... on second thought, it does eventually trigger an error. Any tips @octref ? |
Yeah, but now you have fine-control over all the rules that eslint-plugin-vue@beta provides! |
Maybe this is an issue between my local packages and my vscode extension deps? |
So VSCode still shows an error? |
Correct. It just took a while to parse through and highlight things. The local project has this dep: |
Maybe I need to set up a global Update: I upgraded the local project to eslint-plugin-vue@beta, and reloaded the editor, but still getting highlighting. Anyone else get this running yet? @SharpSeeEr ? Update: I've also tried adding a global {
"eslint.options": {
"configFile": "~/.eslintrc.json"
}
} |
Currently we have the template checking on by default using Meanwhile with VSCode's ESLint plugin and dependency / eslintrc correctly setup, you should also be able to template linting and have fine control over the rules with .eslintrc. |
Cool—the usual css-esque config cascade. Do you see anything wrong with what I'm doing then? I'm not entirely sure why I can't tap into the suite of vue lint rules. |
This is still not fixed for me. |
Because we haven't released the new change yet? |
I'm not really sure. I've tried quite a few configurations, and tried to hunt down some info, but I'm running out of ideas. |
Upgrade to 0.8.3 and set |
Awesome! This works. 👍 I'm still confused why I can't get the vue eslint rule working. |
Thanks for adding that template false. I'm with @alexsasharegan that I'd like to get the vue eslint rules working too but until I can customize them I'll just live with disabling all of them. |
You can customize them: https://octref.github.io/vetur/linting-error.html |
Error: Self-Closing Tags
While self-closing tags are not valid for in-dom templates, the vue-loader that parses
.vue
files into render functions can handle self-closing tags in v2. See this comment in the vue issues: vuejs/vue#1036 (comment)Expected
I think a nice aesthetic around this environment specific error is to make it a configuration option. Another option would be to ignore this error in
.vue
files.The text was updated successfully, but these errors were encountered: