lingui / lingui/eslint-plugin

no-single-variables-to-translate false positive

Open
#104 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

For code:

```tsx

{websiteCount}{' '}

```

It will report an error, but this is valid:

```
msgid "<0>{websiteCount} {websiteCount, plural, one {Website} other {Websites}}"
```

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 reproducing the no-single-variables report with the TSX snippet from the issue, then trace the rule that handles the Trans and Plural elements. Add coverage for this valid message shape and verify that the false positive is gone while the rule still reports actual violations.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.