Rules are silently ignored if not valid JavaScript · Issue #1035 · htmlhint/HTMLHint · GitHub
Skip to content

Rules are silently ignored if not valid JavaScript #1035

Open

Description

@thatsIch

Describe the bug
Upon writing custom rules, we often encounter that HTMLHint does not notify us about broken rules.

To Reproduce

  1. Define a custom rule like
module.exports = HTMLHint > {

};

Expected behavior
Like in #662 it is expected, that at least some warning is shown, which rule could not be loaded.

Additional context

The result is to be expected due to catching all errors regarding rule imports and ignoring them:

Activity

  1. added
    bot:staleIssue marked as stale because there was no activity
    on Jul 30, 2022
  2. removed
    bot:staleIssue marked as stale because there was no activity
    on Jul 31, 2022
  3. deleted a comment from stale on Sep 14, 2022
  4. added
    bugFunctionality that does not work as intended/expected
    on Sep 14, 2022
  5. thatsIch commented on Oct 30, 2022

    @thatsIch
    Author

    I saw, that #662 was fixed with bad68d9.
    I guess, that the solution could be pretty similar. I am unsure where to put the test-rules.

    Maybe a new folder?

    • /test/test-rules/valid-rule.js
    • /test/test-rules/invalid-rule.js
  6. added theissue type on Jun 6, 2025
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

    bugFunctionality that does not work as intended/expectedkeep-unstaleThe issue will not be marked as stale by the stale-bot

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions