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

Extending rules to support more Lingui usecases #4

Open
timofei-iatsenko opened this issue Aug 18, 2023 · 1 comment
Open

Extending rules to support more Lingui usecases #4

timofei-iatsenko opened this issue Aug 18, 2023 · 1 comment

Comments

@timofei-iatsenko
Copy link
Collaborator

Currently, the rules are "happy path" only. It means it doesn't cover every edge case. In this issue i will start collecting problems which I noticed (not a complete list though):

  • Most of the rules doesn't check that components are actually belongs to Lingui. It just checking it by name such as Trans and t. It means if you have your own Trans component it will be also subject of validation despite it imported from diffrent package.
  • The rules doesn't support renamed symbols. If you have import Trans as $Trans from "@lingui/macro" rules would not be applied to $Trans usages
  • Rules do understand only few macros, such as t but don't understand defineMessage and msg. They also don't understand any other usage of the rule than TaggedTemplateExpression. Means calls such as t({message: "Hello!"}) would be ignored or even fail.
@yuriy-yarosh
Copy link

@thekip I'd suggest making making recommended settings first e.g. plugin:lingui/recommended.

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

No branches or pull requests

2 participants