`.htmlhintrc` silently ignored if not valid JSON · Issue #662 · htmlhint/HTMLHint · GitHub
Skip to content

.htmlhintrc silently ignored if not valid JSON #662

Closed

Description

@eliasschoof

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.

Activity

  1. changed the title [-].htmlhintrc silently ignored if not valid JSON[/-] [+]`.htmlhintrc` silently ignored if not valid JSON[/+] on Jun 30, 2021
  2. marwinburesch commented on Jul 20, 2021

    @marwinburesch

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

  3. stale commented on Sep 19, 2021

    @stale

    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.

  4. added
    bot:staleIssue marked as stale because there was no activity
    on Sep 19, 2021
  5. added
    keep-unstaleThe issue will not be marked as stale by the stale-bot
    and removed
    bot:staleIssue marked as stale because there was no activity
    on Oct 23, 2021
  6. added 5 commits that reference this issue on Jan 30, 2022
    8c4f086
    21da70b
    52ca8c9
    653dd66
    f39ef04
  7. added a commit that references this issue on Jul 23, 2022
    f16d78c
  8. added a commit that references this issue on Sep 6, 2022
    bad68d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    keep-unstaleThe issue will not be marked as stale by the stale-bot

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions