-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Enhancement: Support parsing plain HTML #28
Comments
Thank you for this issue. Hmm, I'm thinking. This parser doesn't support whole HTML spec. For example, this doesn't parse |
We could make it an optional rule, and let's say require templates to have We have plenty of useful rules, and there is also a great It doesn't have to support whole HTML spec. What it supports at this moment should be perfect. I wouldn't bother about |
Adding a |
We cannot make plugin preprocessors optional.
I guess that this solution cannot avoid the confliction between
We can use those together. I can check
We cannot check the HTML comment because this is a parsing matter. We have to distinguish it before parsing files. |
There shouldn't be a reason to add |
@tfoxy It's a confliction matter. Both vue and html plugins handle the same file, then both plugins will get unexpected results. |
Is there really no way to get this to work? I'm not using |
Any idea how I could lint .html files if they are just sourced by .vue files ? |
Well, looks like I have kinda hacky idea. Here is <script lang="js" src="./my-component.js" />
<template lang="html" src="./my-component.html.vue" /> As you can see, template extension is Can confirm that most of rules work as expected, e.g. Important note: your template should be wrapped into <template>
<div>
...
</div>
</template> Still not sure if it can be recommended to use safely, hope @mysticatea can leave a comment like an expert. |
I see that some people are using external files with vue templates only. We have an open issue regarding this topic here: vuejs/eslint-plugin-vue#490
Would it be possible to support parsing plain HTML in addition to SFC?
The text was updated successfully, but these errors were encountered: