New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTMLhint now complains about Doctype, ignores .htmlhintrc #22

Open
dbaeumer opened this Issue Jan 18, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@dbaeumer
Member

dbaeumer commented Jan 18, 2017

From @smlombardi on January 17, 2017 17:13

  • VSCode Version: Code - Insiders 1.9.0-insider (f67f87c5498d9361c0b29781c341fd032815314b, 2017-01-17T07:04:34.904Z)
  • OS Version: Darwin x64 16.3.0
  • Extensions:
Extension Author Version
material-icon-theme PKief 1.2.0
code-settings-sync Shan 2.4.2
sort-lines Tyriar 1.1.0
html-css-class-completion Zignd 1.0.3
Bookmarks alefragnani 0.10.2
project-manager alefragnani 0.13.0
vscode-angular-files alexiv 1.3.7
one-monokai azemoh 0.2.4
vscode-icontheme-nomo-dark be5invis 1.2.5
vscode-eslint dbaeumer 1.2.2
githistory donjayamanne 0.1.5
tslint eg2 0.8.1
vscode-great-icons emmanuelbeziat 1.1.38
Angular2 johnpapa 1.0.2
theme-karyfoundation-themes karyfoundation 10.3.0
ftp-sync lukasz-wronski 0.3.2
HTMLHint mkaufman 0.3.3
vscode-csscomb mrmlnc 4.0.0
vscode-postcss-sorting mrmlnc 2.2.0
vscode-stylefmt mrmlnc 2.2.2
Theme-1337 ms-vscode 0.1.2
angular2-inline natewallace 0.0.17
nonbreakingspace smlombardi 0.0.1
vscode-icons robertohuertasm 7.0.1
stylelint shinnn 0.21.2
darcula-extended smlombardi 3.2.0
theme-tesla smlombardi 6.0.0
change-case wmaurer 1.0.0

Steps to Reproduce:

Prior to the most recent Insiders update I did not have this issue

  1. open an html file fragment, e.g. code meant to be used as an include or an AngularJS view, which has no Doctype, html, head or body tags
  2. gives you a warning:
    screen shot 2017-01-17 at 12 08 49 pm

My project has an .htmlhintrc file which says not to apply this rule:

{
    "tagname-lowercase": true,
    "attr-lowercase": ["viewBox", "test"],
    "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,
    "style-disabled": false
}

But I get the error anyway.

Copied from original issue: Microsoft/vscode#18678

@warent

This comment has been minimized.

warent commented Nov 18, 2017

Any plans on fixing this? It's making the extension unusable for me since I'm editing templates within Vue components

EDIT:
I found a workaround, just add the rules manually in your vscode settings

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

Less than ideal but at least it's usable now :)

@nebulousdog

This comment has been minimized.

nebulousdog commented Sep 5, 2018

I get this same issue, but I'm just using the CLI fyi. Likely an issue upstream with htmlhint 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment