-
-
Notifications
You must be signed in to change notification settings - Fork 681
False positives with inline svg content #580
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
Comments
Hey! Thank you for posting the issue! The first error is to be expected as it’s the custom component. You can however change the casing to „kebab-case” if you want. The second error on the other hand should not happen and I’m grateful you have spotted it. We should extend the list of components to catch those possible inside SVGs. |
Thanks! I'm not sure if you missed one point there: it's actually three problems
1. can be fixed like this: https://github.com/ThomasR/eslint-plugin-vue/commit/df2211c282da3d294d2877428e7dcb3d6740a41d Here's a fix for 2. : https://github.com/ThomasR/eslint-plugin-vue/commit/9714c42d4f4e3cd0c8b408071aa4113842889ec2 3. can be worked around using
as you mentioned. Not sure what's the cleanest way to fix it though. Since the parser does not know that the component gets injected into an SVG element, we would have to treat all SVG elements like HTML elements, that is: add all SVG elements to |
Tell us about your environment
Please show your full configuration:
What did you do? Please include the actual source code causing the issue.
I'm writing an app that makes use of SVG components. Apparently this does not work well with eslint-plugin-vue, even though the app works just fine.
The following is a minimal example to demonstrate the issues:
App.vue
:MyContent.vue
:What did you expect to happen?
There should be one error
What actually happened? Please include the actual, raw output from ESLint.
The text was updated successfully, but these errors were encountered: