HTMLHint icon indicating copy to clipboard operation
HTMLHint copied to clipboard

`.htmlhintrc` silently ignored if not valid JSON

Open estrehle opened this issue 4 years ago • 2 comments

If the .htmlhintrc is not valid JSON, the linter silently ignores it and uses a default config.

For example, I had made the mistake of keeping a trailing comma:

{
    "attr-lowercase": false,
}

The default config has "attr-lowerclase": true and I received a lot of unwanted errors. It took me a while to figure out that the malformatted JSON was the culprit.

It would be helpful if the linter at least displayed a warning log message upon execution if it cannot parse the config file.

estrehle avatar Jun 30 '21 09:06 estrehle

I agree, for example the docs use single quotes in the examples, but it is only valid with double quotes

marwinburesch avatar Jul 20 '21 12:07 marwinburesch

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 19 '21 00:09 stale[bot]