[eslint-plugin] Skip single-value gridArea in valid-shorthands#1737
Open
henryqdineen wants to merge 1 commit into
Open
[eslint-plugin] Skip single-value gridArea in valid-shorthands#1737henryqdineen wants to merge 1 commit into
henryqdineen wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
What changed / motivation ?
Single-value
gridAreausages likegridArea: 'header'are flagged byvalid-shorthandsand auto-expanded to four longhand properties (gridRowStart,gridRowEnd,gridColumnStart,gridColumnEnd). This is inconsistent with howflex(#1670) andgap(#1668) were updated to skip single-value usages, and inconsistent with the rule's stated purpose of enforcing single-value shorthands over multi-value shorthands.gridArea: 'header'is a single-token value — a standard CSS Grid pattern for referencing named template areas. The existingisSingleTokenutility (introduced in #1670) already handles this check forflex; this PR extends it togridArea.Multi-value
gridArea(e.g.gridArea: 'header / sidebar',gridArea: '1 / 2 / 3 / 4') is still correctly flagged and auto-fixed.Linked PR/Issues
Follow-up to #1670, #1668, #1477.
Additional Context
1 single-value
gridAreatest case moved frominvalidtovalid. All 136 tests pass.Pre-flight checklist
Contribution Guidelines