【发布时间】:2020-12-11 11:01:12
【问题描述】:
当我运行 prettier 时出现此错误。
..\index.component.html
[error] ..\index.component.html: SyntaxError: Only void and foreign elements can be self closed "home-hero" (3:5)
[error] 1 |
[error] 2 | <layout>
[error] > 3 | <home-hero slot="hero" />
[error] | ^
[error] 4 |
[error] 5 | <h3 slot="callout" />
[error] 6 |
但我想使用自我关闭标签。如何设置 prettier 忽略这个错误?
在prettier schema 中,我没有看到任何关于“self”或类似内容的引用。
【问题讨论】:
-
这是一个 angular/react/nativescript 应用程序吗?