Tidy rule headers and dedupe vague/placeholder word lists - #51
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR standardizes/clarifies rule and utility headers, and centralizes “placeholder” alt-text strings into the placeholder-alt-text rule to avoid duplicating that vocabulary in vague-alt-text.
Changes:
- Moved placeholder-like single words/phrases out of
vague-alt-textand intoplaceholder-alt-text, updating tests accordingly. - Reformatted/expanded placeholder word lists in unit tests for readability and broader coverage.
- Replaced/added concise file-level header comments across several rules/utilities.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/vague-alt-text.test.ts | Updates single-word vague list test and asserts placeholder strings are no longer flagged by vagueAltText. |
| tests/unit/placeholder-alt-text.test.ts | Expands and reformats the placeholder corpus asserted to be flagged by placeholderAltText. |
| src/utils/normalize-alt-text.ts | Converts JSDoc block to line comments describing normalization intent/usage. |
| src/rules/vague-alt-text.ts | Removes placeholder terms/phrases from vague sets and adds a concise file header. |
| src/rules/repeated-alt-text.ts | Adds a concise file header comment. |
| src/rules/placeholder-alt-text.ts | Adds a concise file header and expands placeholder set with more common boilerplate strings. |
| src/rules/missing-alt-text.ts | Adds a concise file header comment describing behavior around alt="". |
| src/rules/filename-alt-text.ts | Adds a concise file header comment. |
| src/config.ts | Adds clarifying comments about config loading and rule override extraction. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 9/9 changed files
- Comments generated: 0
- Review effort level: Low
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.
No description provided.