Skip to content

Allow stylex.env keys in the valid styles lint rule - #1809

Open
Hashim1999164 wants to merge 1 commit into
facebook:mainfrom
Hashim1999164:allow-stylex-env-object-keys
Open

Allow stylex.env keys in the valid styles lint rule#1809
Hashim1999164 wants to merge 1 commit into
facebook:mainfrom
Hashim1999164:allow-stylex-env-object-keys

Conversation

@Hashim1999164

@Hashim1999164 Hashim1999164 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #1764

valid styles currently reports stylex.env member expressions used as object keys. The compiler already treats those as compile time literals, the same way it treats string media queries.

This change recognizes stylex.env chains and named env imports so the rule no longer flags them. Nested CSS values are still checked as usual.

@vercel

vercel Bot commented Aug 14, 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 Ignored Ignored Aug 14, 2026 10:59pm

Request Review

@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 Aug 14, 2026
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.

@stylexjs/valid-styles lint rule prevents using stylex.env values as media-queries

1 participant