visual-studio-codemeteor-react

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.

Solution

  • 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
    }