Repository navigation
Add per-line HTMLHint disable quick fix - #430
Merged
Merged
Conversation
Introduce a new code action for diagnostics that adds `<!-- htmlhint-disable-next-line rule-id -->` above the offending line, or appends the rule to an existing disable-next-line comment. The server now deduplicates these actions per rule/line and lists them after autofixes. Documentation and changelog were updated, and autofix test fixtures/config were expanded with additional rule cases.
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The action can corrupt multiline tags and invalidate existing inline suppressions.
1 open finding
What changed in this PR
Adds per-line HTMLHint suppression quick fixes alongside existing autofixes.
Changes:
- Generates deduplicated disable-next-line actions.
- Expands autofix fixtures and documentation.
- Updates dependency and release metadata.
| File | Description |
|---|---|
htmlhint-server/src/server.ts |
Implements suppression quick fixes. |
test/autofix/test-autofixes.html |
Adds rule fixtures. |
test/autofix/.htmlhintrc |
Configures additional rules. |
htmlhint/README.md |
Documents the quick fix. |
htmlhint/CHANGELOG.md |
Records the feature. |
htmlhint/package.json |
Updates Node typings. |
htmlhint/package-lock.json |
Locks the dependency update. |
htmlhint/LICENSE.md |
Updates the copyright year. |
Files not reviewed (1)
- htmlhint/package-lock.json: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Match the htmlhint directive anywhere on the previous line and replace only the directive itself, so content before or after it is kept and an existing suppression is not shifted onto the newly inserted comment. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KuJTTYq3CpvR1S6x5iQxwH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

<!-- htmlhint-disable-next-line rule-id -->above the offending line, or appends the rule to an existing disable-next-line comment.