Meteor typescript complaining about missing doctype in vscode

烈酒焚心 提交于 2020-05-13 07:10:33

问题


VSCode is complaining about missing DOCTYPE on the html files. Meteor build system automatically adds file types and having them causes build errors. How do I make vscode to ignore missing doctype on html files?

Error I get for this.

Doctype must be declared first.

回答1:


you need to create a .htmlhintrc in your root folder

you can go to http://htmlhint.com/ and setup the rules that are convient to you and create the .htmlhintrc

here is an example with "doctype-first": false,, which would ignore the error you're receiving, if that's your goal.

{
  "tagname-lowercase": true,
  "attr-lowercase": false,
  "attr-value-double-quotes": true,
  "doctype-first": false,
  "tag-pair": true,
  "spec-char-escape": true,
  "id-unique": true,
  "src-not-empty": true,
  "attr-no-duplication": true,
  "title-require": true
}


来源:https://stackoverflow.com/questions/38111081/meteor-typescript-complaining-about-missing-doctype-in-vscode

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