feat: New rule: tag-no-obsolete
#1660
Merged
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.
https://htmlhint.com/rules/tag-no-obsolete/
What it does:
Disallows the use of obsolete HTML5 tags
Detects both opening and closing tags
Case-insensitive detection (works with
<CENTER>
,<center>
, etc.)Obsolete tags detected:
Files created/updated:
✅ src/core/rules/tag-no-obsolete.ts - Rule implementation
✅ src/core/rules/index.ts - Rule export
✅ src/core/types.ts - TypeScript interface
✅ test/rules/tag-no-obsolete.spec.js - Test suite
✅ website/src/content/docs/rules/tag-no-obsolete.mdx -
Documentation
✅ website/src/content/docs/rules/index.mdx - Rules index
Test results:
✅ All 4 tests pass
✅ Documentation test passes
✅ All existing tests still pass
✅ Manual testing confirms the rule works correctly
The rule is now fully integrated into HTMLHint and ready to use! Users can enable it by adding
tag-no-obsolete
: true to their HTMLHint configuration.