Skip to content

Conversation

@mellyeliu
Copy link
Member

@mellyeliu mellyeliu commented Sep 3, 2025

The isNumber lint check was incorrectly flagging identifiers for constants declared in the same file. We generally allow them in place of number literals as Babel handles the static evaluation of these bindings.

The rule now resolves scope correctly so that same-file const identifiers initialized with numbers can be used within arithmetic expressions and pass without error.

Within the isNumber check

  • resolve math expressions down to both sides as before
  • use getScope to determine whether any identifiers are declared within the file
@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 Sep 3, 2025
@github-actions
Copy link

github-actions bot commented Sep 3, 2025

workflow: benchmarks/perf

Comparison of performance test results, measured in operations per second. Larger is better.

benchmarks@0.15.3 compare
node ./compare.js /tmp/tmp.msjDvKkzSg /tmp/tmp.AElsaN1Mkl

Results Base Patch Ratio
babel-plugin: stylex.create
· basic create 642 641 1.00 -
· complex create 190 188 0.99 -
babel-plugin: stylex.createTheme
· basic themes 452 448 0.99 -
· complex themes 42 42 1.00
@github-actions
Copy link

github-actions bot commented Sep 3, 2025

workflow: benchmarks/size

Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better.

benchmarks@0.15.3 compare
node ./compare.js /tmp/tmp.DLsJEYfZx2 /tmp/tmp.tOpCWllIyW

Results Base Patch Ratio
@stylexjs/stylex/lib/cjs/stylex.js
· compressed 1,190 1,190 1.00
· minified 3,541 3,541 1.00
@stylexjs/stylex/lib/cjs/inject.js
· compressed 1,223 1,223 1.00
· minified 3,216 3,216 1.00
benchmarks/size/.build/bundle.js
· compressed 496,650 496,650 1.00
· minified 4,847,840 4,847,840 1.00
benchmarks/size/.build/stylex.css
· compressed 99,853 99,853 1.00
· minified 747,541 747,541 1.00
@mellyeliu mellyeliu marked this pull request as ready for review September 3, 2025 17:45
@mellyeliu mellyeliu merged commit 648008d into main Sep 3, 2025
9 checks passed
@mellyeliu mellyeliu deleted the eslint-fix branch September 3, 2025 18:41
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.

3 participants