Opt-in (allowlist) mode for `no-unlocalized-strings`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 33
- Forks
- 25
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 9
Description
Currently, `no-unlocalized-strings` operates on an "opt-out" / denylist approach (checking all strings by default unless explicitly ignored). This requires maintaining large lists of `ignoreFunctions` and `ignoreNames`, and it becomes especially cumbersome when working with:
* JSXElements that define string-typed non-rendereable attributes.
* Several functional HTML attributes like `aria-selected`.
For many projects, an opt-in approach, even if less thorough, provides a compromise between correctness and configuration overhead.
---
The proposal here is to introduce an opt-in mode for the linter, so rather than `ignore*` lists, the linter supported `check*` lists (or a similar prefix name), where it will only look at attributes, functions, and identifiers that match those lists.
JSX text nodes should still be checked tho
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing no-unlocalized-strings rule and its ignoreFunctions and ignoreNames configuration. Trace how JSX attributes, functions, identifiers, and JSX text nodes are selected, then inspect the rule's tests if available. Done means an opt-in configuration checks only matching items while JSX text nodes remain checked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- eslint, typescript
- Domain
- internationalization, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100