Skip to content

Conversation

@j-malt
Copy link
Contributor

@j-malt j-malt commented Jan 14, 2026

What changed / motivation ?

stylex.defineMarker() will not work if not imported from a *.stylex.(ts|js) file, but if a defineMarker is exported from a StyleX file the ESLint enforce-extension rule will error with:

Only variables from stylex.defineVars() or stylex.defineConsts() can be exported from a file with a .stylex.ts extension

You can see an example of the sort of usage that would fail in the docs.

This PR extends the rule to require these functions only be exported from StyleX files.

Pre-flight checklist

@vercel
Copy link

vercel bot commented Jan 14, 2026

@j-malt is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@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 Jan 14, 2026
@j-malt j-malt marked this pull request as ready for review January 14, 2026 16:15
@mellyeliu mellyeliu merged commit ebe7d18 into facebook:main Jan 14, 2026
6 of 9 checks passed
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.

2 participants