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

fix(no-unlocalized-strings): Enhanced no-unlocalized Rule for advanced syntax support #21

Conversation

radist2s
Copy link
Contributor

@radist2s radist2s commented Dec 7, 2023

Changes:

  • Support added for the following syntax patterns:
    •  t(i18n)({ message: `Hello ${name}` })
    •  custom.wrapper()({message: "Hello!"})

Problem: Previously, the isValidFunctionCall helper did not fully process function calls involving callee with a MemberExpression type.

Solution: The update ensures that ignoreFunction within CallExpression is properly utilized.

@radist2s radist2s force-pushed the fix/no-unlocalized-strings-call-expression-utilization branch from b82f4a7 to 67a5baf Compare December 7, 2023 17:52
@radist2s radist2s changed the title Enhanced no-unlocalized Rule for advanced syntax support fix(no-unlocalized-strings): Enhanced no-unlocalized Rule for advanced syntax support Dec 7, 2023
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a4d7683) 95.20% compared to head (8bc40f2) 95.48%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   95.20%   95.48%   +0.27%     
==========================================
  Files          10       10              
  Lines         438      443       +5     
  Branches      136      140       +4     
==========================================
+ Hits          417      423       +6     
+ Misses         21       20       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@timofei-iatsenko
Copy link
Collaborator

Thanks!

@radist2s radist2s force-pushed the fix/no-unlocalized-strings-call-expression-utilization branch from 67a5baf to 8bc40f2 Compare December 7, 2023 19:01
@radist2s
Copy link
Contributor Author

radist2s commented Dec 7, 2023

@thekip, updated isValidFunctionCall to increase coverage

@andrii-bodnar andrii-bodnar merged commit e84de6e into lingui:main Dec 8, 2023
4 checks passed
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.

3 participants