0

I've just installed htmlhint, and I'm using this .htmlinitrc:

{
  "doctype-first": false
}

because this project is largely made up of include files, which don't have a DOCTYPE. The problem is that this turns off all the rule checking. Without this rule, I get various other errors reported. With this rules, I get zero errors reported (I'm running as npx htmlhint, and it reports that .htmlhinitrc has been loaded, but no errors were found). Any ideas?

QF0
  • 329
  • 2
  • 14
  • What do you mean by "no documentation"? https://htmlhint.com/docs/user-guide/list-rules – zerdox Mar 01 '23 at 10:38
  • @zerdox: that's a list of rule titles and values; not what to put in an `.htmlhintrc` file. That's how I know that there's a `doctype-first` rule, for example. Googling shows that the github site did at some point have an example `.htmlhintrc` file, but it seems to have gone. – QF0 Mar 01 '23 at 11:38
  • According to https://htmlhint.com/docs/user-guide/usage/options#configfile configuration file is simply a json file. Do you need docs how to write json or smth? What is your question we need to answer on? – zerdox Mar 01 '23 at 11:40
  • @zerdox: the problem is that my `.htmlinitrc`, which has just `doctype-first:false` in it, turned off *all* error reporting, and not just the `doctype-first` errors. If I don't have `.htmlinitrc` I get about 50 other errors, as well as the `doctype-first` ones. I suspect that my `.htmlinitrc` is incorrect in some way, but I don't know. – QF0 Mar 01 '23 at 13:16
  • @zerdox: I've clarified and simplified the question; the example `.htmlinitrc` on the website isn't really relevant. – QF0 Mar 01 '23 at 13:21
  • If your question is "why without config I get errors, but with this config I dont". Probably there is a default one? Which issues do you encounter while configuring htmlhint?... – zerdox Mar 01 '23 at 13:35
  • @zerdox: I don't think there's a default config file which I'm overwriting. But I'm just guessing, since it's not documented on the website. That's why I'm asking here :) `doctype-first` turns off various errors - HTML characters not properly encoded, missing quotes, and so on. – QF0 Mar 01 '23 at 13:46

0 Answers0