mui / mui/material-ui

[code-infra] Replace all references of event as e

Open
#41,968 6 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: code-infra
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

For example https://github.com/mui/material-ui/blob/1103320f310e799216d6f2cf76d4e8054b1dc0de/docs/data/joy/components/list/ExampleNavigationMenu.tsx#L67

Also enforce this with an eslint rule. e.g. https://eslint.org/docs/latest/rules/id-length https://eslint.org/docs/latest/rules/id-denylist

Single letter identifiers are desired in some cases (t for translations, and i, j, k for loop variables). So let's keep the scope of this issue down to specific identifiers only and not enforce it by length. Some other ids I can think of are:

  • err => error
  • res => response, or did you mean result, or resolve?
  • ?

Contributor guide

Open the contributing guide

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 with docs/data/joy/components/list/ExampleNavigationMenu.tsx around the referenced event identifier, then search the repository for the specified short names. Review ESLint's id-denylist rule and define exceptions for intended identifiers such as t, i, j, and k. Done means the targeted references are expanded and the lint rule enforces those names consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, typescript
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.