unrecognized tags in WebStorm
See original GitHub issueSteps to reproduce
create a template with <v-layout>
, <v-flex>
, <v-card>
, <v-card-*>
components
Versions
0.14.8
What is expected ?
v-layout and other tags should be recognized by WebStorm as known elements
What is actually happening ?
Get a warning “Unknown html tag”
Reproduction Link
screenshot: http://imgur.com/a/UOAZr
Fix
Just my guess - I didn’t checked all but some of the tags that are not recognized don’t have the “name” property. For example <v-card> doesn’t have it and it’s not recognized but <v-card-media> has and it’s recognized
Edit: some components without “name” have “functional” property set to true, and those with “name” are not “functional”, I’m not sure if adding “name” to “functional” components doesn’t break anything
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Deleting a custom tag – IDEs Support (IntelliJ Platform)
So I created a custom tag by accident in Webstorm (I typed something that didn't exist and then I clicked on 'add to...
Read more >Adding custom html tags to Intellij? - Stack Overflow
Place the caret over the highlighted tag, hit ALT + ENTER and select Add tag to custom tags. However that works only for...
Read more >WebStorm Unknown ionic html tag
WebStorm 2020.1 Build #WS-201.6668.106, built on April 7, 2020 macOS 10.15.7 My package.json as below, { "name": "sleep", "version": "0.0.1" ...
Read more >unknown html tag in phpstorm - Laracasts
unknown html tag in phpstorm. I am using phpstorm but the error on blade files is really annoying. how can I fix this...
Read more >Code Inspections in HTML - Help | PhpStorm - JetBrains
Inspection Description Default Severity
Deprecated HTML attribute Highlights attributes deprecated in HTML5. Warning
Non‑existent web resource Highlights links to non‑existent web resources. Disabled
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As per @jacekkarczmarczyk’s comment, I found that if I added a
name:
entry to the functional components in the src directory of node_modules, Webstorm would then correctly detect the component. For example, in VCardTitle I added aname: 'v-card-title',
.To be fair on the Webstorm plugin, Vue is so flexible in what can be a component, it is pretty hard to detect what is a Vue component. Even working back from the Vue.component() calls in this case requires non-trivial data flow analysis/code simulation:
Note that webstorm does detect components declared with Vue.extends and Vue.component(‘literal-name’, …).
For reference, the part of the webstorm plugin that does the detection seems to be: https://github.com/JetBrains/intellij-plugins/blob/9e149f9a12c6844a767aa674e7da44c2d07a4f54/vuejs/src/org/jetbrains/vuejs/codeInsight/VueFrameworkHandler.kt#L106
@ChavaSobreyra I created a Webstorm issue (https://youtrack.jetbrains.com/issue/WEB-28318), but I’m not convinced Webstorm can do a sensible job without some hints.
At the cost of adding a name property to the remaining components that don’t already have one, the result would be pretty good support in Webstorm. The benefits aren’t just tag detection, but also pretty good intellisense for component props/attributes (mixin props aren’t detected yet though).
Sound like an issue to take up with the WebStorm vue plugin team, no? Doesn’t look like there’s anything invalid on the vuetify side…
By the way, in Webstorm you can click on the unrecognized elements and hit
alt
+enter
which will bring up a menu with an optionadd x to custom html tags