MetaMask / MetaMask/metamask-extension

[P1] selectors: remove the `./selectors` barrel line and delete `selectors.js`

Open
#44,580 1 comment 0 reactions 0 assignees View on GitHub
exalate-duplicate INVALID-ISSUE-TEMPLATE mig-epic-71-child team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

**Parent Epic:** [#44566 — `selectors.js` decomposition](https://github.com/MetaMask/metamask-extension/issues/44566)
**Source:** `ui/selectors/selectors.js`
**Size:** M

---

## Problem

After every domain is extracted, `selectors.js` is empty and `ui/selectors/index.js` still carries `export * from './selectors'`. Neither should survive (no-barrel-files convention).

## Solution

Confirm no remaining imports of `ui/selectors/selectors` (the ~37 direct importers are repointed by the domain tickets; codemod any stragglers to the domain modules), remove the `export * from './selectors'` line from `ui/selectors/index.js`, and **delete `selectors.js`**. Sequence last, after all domain tickets land. (Fully retiring the other 11 `export *` lines of the `index.js` barrel is a separate follow-up, out of scope here.)

## Acceptance Criteria

- [ ] No imports of `ui/selectors/selectors` remain.
- [ ] `export * from './selectors'` removed from `ui/selectors/index.js`.
- [ ] `selectors.js` deleted; no require cycles. Tests green.

Contributor guide

Open the contributing guide

Research direction

Start by checking the parent decomposition work and searching for remaining imports of ui/selectors/selectors. Inspect ui/selectors/index.js and ui/selectors/selectors.js, then remove the barrel export and delete the empty source file only after domain tickets have landed. Done means no imports remain, no require cycles are introduced, and tests are green.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.