How to register custom html tags in Resharper?

房东的猫 提交于 2019-12-21 12:02:47

问题


I would like to use custom tags in my html files to include custom knockout components [1]:

<like-widget params="value: userRating"></like-widget>

I added the tag to the VisualStudio html formatting settings:

Tools > Options > Text Editor > HTML (Web Forms) > Formatting > Tag Specific Options

Resharper still does not recognize the custom tag and gives the warning

Cannot resolve tag "like-widget"

How do I tell Resharper to allow that specific tag without disabling the unknown tag warning? Is there some sort of setting file where I can register custom html tags?

Related article:

How to add custom HTML Tags to Visual Studio and Avoid Squiggly Lines


回答1:


It is not possible right now - there is a related ticket https://youtrack.jetbrains.com/issue/RSRP-434190.




回答2:


I would suggest to Disable the Inspection for Unknown HTML Tags as I indicated here:

Can I stop ReSharper objecting to Ionic HTML tags?



来源:https://stackoverflow.com/questions/33774119/how-to-register-custom-html-tags-in-resharper

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!