lingui / lingui/eslint-plugin

New Rule: Disallow t inside t

Open
#90 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
TypeScript
Stars
33
Forks
25
Avg merge
1d 16h
Merged PRs (30d)
9

Description

Similar to the no-trans-inside-trans rule, I've noticed that there are failures to extract strings when a t is used inside a t. For example, this should be an error:

t`some text ${t`some other text`}`

Thanks for this great library!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing no-trans-inside-trans rule and its related tests, then compare how nested tagged templates are detected. Add the new rule for a t used inside another t and verify that the reported example is rejected without affecting valid translations.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.