Kimmo Hintikka
Kimmo Hintikka

Reputation: 15430

Meteor typescript complaining about missing doctype in vscode

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.

Upvotes: 6

Views: 4882

Answers (2)

André Bueno
André Bueno

Reputation: 89

Go to your VScode Preferences > Settings > HTML-Hint and add this:

"htmlhint.options": { "doctype-first": false }

Upvotes: 5

Sebastian Castaldi
Sebastian Castaldi

Reputation: 9004

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
}

Upvotes: 15

Related Questions