Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove the traverse code in parseJSXElement to eliminate redundant calls for setting translation keys #250

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

cheton
Copy link
Member

@cheton cheton commented Jul 11, 2023

This PR removes the traverse code in parseJSXElement to eliminate redundant calls for setting translation keys. The functionality is now handled by the acorn-jsxwalk library, which allows for traversing all JSXElement nodes seamlessly.

Checklist

  • only relevant code is changed (make a diff before you submit the PR)
  • run tests npm run test
  • tests are included
  • commit message and code follows the Developer's Certification of Origin

@cheton cheton self-assigned this Jul 11, 2023
@codecov
Copy link

codecov bot commented Jul 11, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.18 ⚠️

Comparison is base (27575e9) 91.31% compared to head (1b833ba) 91.13%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #250      +/-   ##
==========================================
- Coverage   91.31%   91.13%   -0.18%     
==========================================
  Files           6        6              
  Lines         564      553      -11     
==========================================
- Hits          515      504      -11     
  Misses         49       49              
Impacted Files Coverage Δ
src/parser.js 90.46% <ø> (-0.25%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cheton cheton changed the title refactor: remove unnecessary recursive calls in parseJSXElement refactor: remove the traverse code in parseJSXElement to eliminate redundant calls for setting translation keys Jul 11, 2023
@cheton cheton merged commit 9df5133 into master Jul 11, 2023
7 checks passed
@cheton cheton deleted the refactor/parsing-jsx-element branch July 11, 2023 06:37
cheton added a commit that referenced this pull request Jul 11, 2023
…redundant calls for setting translation keys (#250)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant