Relax restriction on "let" expression variable names
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 12.4k
- Forks
- 2.4k
- PR merge metrics
- No merged PRs in 30d
Description
Currently, we only allow `a-zA-Z0-9` and `_` in variable names. This is unnecessarily restrictive and, of course, especially problematic for users of non-Latin alphabets.
We can either:
- expand the set of explicitly allowed characters ( @1ec5 @ChrisLoer do you know if there's a reasonable/practical way to do this that would work across many/most scripts? )
- or instead switch to just _disallowing_ characters that aren't valid in JS identifiers.
Contributor guide
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 locating the parser or validator for `let` expression variable names and compare its current `a-zA-Z0-9` and `_` restriction with JavaScript identifier rules. Decide whether to expand allowed characters or reject invalid JavaScript identifier characters, then verify that names from non-Latin scripts are accepted without allowing invalid identifiers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100