Meteor 打字稿抱怨 vscode 中缺少文档类型
Meteor typescript complaining about missing doctype in vscode
VSCode 抱怨 html 文件缺少 DOCTYPE。 Meteor 构建系统会自动添加文件类型,使用它们会导致构建错误。如何让 vscode 忽略 html 文件中丢失的文档类型?
我得到这个错误。
Doctype must be declared first.
您需要在根文件夹中创建一个 .htmlhintrc
您可以前往 http://htmlhint.com/ 并设置您方便的规则并创建 .htmlhintrc
这里有一个 "doctype-first": false,
的例子,如果这是你的目标,它会忽略你收到的错误。
{
"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
}
转到您的 VScode 首选项 > 设置 > HTML-提示并添加:
"htmlhint.options": {
"doctype-first": 错误
}
VSCode 抱怨 html 文件缺少 DOCTYPE。 Meteor 构建系统会自动添加文件类型,使用它们会导致构建错误。如何让 vscode 忽略 html 文件中丢失的文档类型?
我得到这个错误。
Doctype must be declared first.
您需要在根文件夹中创建一个 .htmlhintrc
您可以前往 http://htmlhint.com/ 并设置您方便的规则并创建 .htmlhintrc
这里有一个 "doctype-first": false,
的例子,如果这是你的目标,它会忽略你收到的错误。
{
"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
}
转到您的 VScode 首选项 > 设置 > HTML-提示并添加:
"htmlhint.options": { "doctype-first": 错误 }