Commit 1b26fe5
authored
chore: linting fixes (#261)
## **Description**
This pull request implements several important TypeScript and linting
improvements to enhance code quality and developer experience. Key
changes include:
- Added `.tsx` extension to ESLint configuration to ensure proper
linting of React TypeScript components
- Configured TypeScript path alias for `@metamask/design-system-react`
to enable direct imports and proper IDE support
- Enforced `import type` syntax through ESLint to prevent runtime errors
in `.mjs` files
- Updated TypeScript configuration to include the `stories` folder and
its files for design-tokens
- Ran `prettier` to apply consistent formatting across all affected
files
These changes collectively improve code maintainability, type safety,
and development workflow efficiency.
## **Related issues**
Fixes: N/A
## **Manual testing steps**
1. Run `yarn lint` and ensure there are no TypeScript linting errors
2. Run `yarn prettier .` to verify that all files adhere to the
formatting rules
## **Pre-merge author checklist**
- [x] Followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs)
- [x] Completed this PR template
- [x] Verified the linting and formatting updates
- [x] Applied appropriate labels as per [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)
## **Pre-merge reviewer checklist**
- [ ] Manually tested the PR to confirm no regressions
- [ ] Verified all linting and formatting changes
- [ ] Confirmed that the updates improve code maintainability1 parent 05f9df9 commit 1b26fe5
File tree
29 files changed
+191
-179
lines changed- packages
- design-system-react
- scripts/create-component/ComponentName
- src/components
- button
- icon
- text
- design-tokens
- stories
- components
- ColorSwatchGroup
- ColorSwatch
- types
29 files changed
+191
-179
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | | - | |
27 | | - | |
| 27 | + | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
| 2 | + | |
| 3 | + | |
3 | 4 | | |
4 | | - | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | | - | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 0 additions & 2 deletions
This file was deleted.
0 commit comments