Skip to content

[eslint-plugin] Skip single-value gridArea in valid-shorthands#1737

Open
henryqdineen wants to merge 1 commit into
facebook:mainfrom
henryqdineen:hqd-skip-single-value-grid-area
Open

[eslint-plugin] Skip single-value gridArea in valid-shorthands#1737
henryqdineen wants to merge 1 commit into
facebook:mainfrom
henryqdineen:hqd-skip-single-value-grid-area

Conversation

@henryqdineen

Copy link
Copy Markdown
Collaborator

What changed / motivation ?

Single-value gridArea usages like gridArea: 'header' are flagged by valid-shorthands and auto-expanded to four longhand properties (gridRowStart, gridRowEnd, gridColumnStart, gridColumnEnd). This is inconsistent with how flex (#1670) and gap (#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 existing isSingleToken utility (introduced in #1670) already handles this check for flex; this PR extends it to gridArea.

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 gridArea test case moved from invalid to valid. All 136 tests pass.

Pre-flight checklist

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 24, 2026
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
stylex Skipped Skipped Jun 24, 2026 7:44pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant