doctype-first error
See original GitHub issueDescribe the bug
I’m using htmlhint as a script in my package.json
"lint:html": "htmlhint --config .htmlhintrc ./src/**/*.html"
my .htmlhintrc
{
"doctype-first": false,
"doctype-html5": false,
"head-script-disabled": false
"style-disabled": false,
"title-require": false,
"attr-lowercase": true,
"attr-no-duplication": true,
"attr-no-unnecessary-whitespace": true,
"attr-unsafe-chars": true,
"attr-value-double-quotes": true,
"attr-value-not-empty": false,
"alt-require": true,
"tagname-lowercase": false,
"input-requires-label": true,
"tags-check": true.
"tag-pair": true,
"tag-self-close": true,
"tagname-lowercase": true,
"empty-tag-not-self-closed": true,
"src-not-empty": true,
"href-abs-or-rel": false,
"id-class-ad-disabled": true,
"id-class-value": true,
"id-unique": true,
"inline-script-disabled": true,
"inline-style-disabled": true,
"space-tab-mixed-disabled": "space",
"spec-char-escape": false,
}
I’m creating components per html like
<div class="my-component">...</div>
and I’m getting an error
L1 |<div class="my-component"></div>
^ Doctype must be declared first. (doctype-first)
How could I disable this rule?, right now I have disabled this rule in my config "doctype-first": false,, but It is not desabled
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Meteor typescript complaining about missing doctype in vscode
here is an example with "doctype-first": false, , which would ignore the error you're receiving, if that's your goal.
Read more >doctype-first - HTMLHint
doctype-first. Doctype must be first. Level: error. Config value. true: enable rule; false: disable rule. The following pattern are not ...
Read more >Need help in validation errors - HTMLHelp Forums
1.Non-space characters found without seeing a doctype first. Expected <!DOCTYPE html>. 2.Element head is missing a required instance of child ...
Read more >Start tag seen without seeing doctype first - WordPress.org
Open SVG is Visual Studio Code; Copy code to Custom Animation. But this time I am getting the red-box-x with the error message:...
Read more >Why am I seeing an "Invalid Doctype" error on my site? - Sumo
If prompted with the "Invalid DOCTYPE" error, it is likely that the DOCTYPE in your site is missing or out of date. This...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

After more investigation I found that for some reason the .htmlhintrc file in my project root wasn’t being loaded, and manually specified it in my Sublime Linter settings:
Thare are some formatting errors in your JSON config file which are causing it to be silently ignored (errors annotated with comments below):