Skip to content

Add svg-tag-name-capitalization linter rule#304

Merged
marcoroth merged 2 commits intomainfrom
svg-tag-name-capitalization-rule
Jul 27, 2025
Merged

Add svg-tag-name-capitalization linter rule#304
marcoroth merged 2 commits intomainfrom
svg-tag-name-capitalization-rule

Conversation

@marcoroth
Copy link
Owner

@marcoroth marcoroth commented Jul 26, 2025

This pull request introduces a new svg-tag-name-capitalization linter rule and updates the html-tag-name-lowercase rule to ignore the children of <svg> tags.

Instead, the svg-tag-name-capitalization ensures that the SVG-specfic elements have proper capitalization (i.e linearGradient, clipPath, etc.)`

Closes #302

- Create separate rule for SVG element capitalization validation
- HTML rule now skips SVG content but validates SVG tags themselves
- SVG rule validates camelCase within SVG contexts (linearGradient, clipPath, etc.)
- Both rules simplified using visitHTMLElementNode approach
- Add comprehensive test coverage for both rules
- Update documentation and include in default rules

Closes #302
@marcoroth marcoroth added feature New feature or request linter linter-rule labels Jul 26, 2025
@marcoroth marcoroth changed the title Add svg-tag-name-capitalization rule Add svg-tag-name-capitalization linter rule Jul 26, 2025
@marcoroth marcoroth merged commit d4286be into main Jul 27, 2025
7 checks passed
@marcoroth marcoroth deleted the svg-tag-name-capitalization-rule branch July 27, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request linter linter-rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

linearGradient incorrectly flagged as invalid (html-tag-name-lowercase)

1 participant