-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update eslint v^8.44 (#10865)
## **Description** This PR aims to update eslint to match extension version and to support the typescript version on mobile and remove this warning: ``` WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree. You may find that it works just fine, or you may not. SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0 YOUR TYPESCRIPT VERSION: 5.4.5 ``` There is some things that we need to do to finish this PR: - [x] Solve new linter issues - [x] Consider keep or not the `@babel/preset-react` to the babel parser config to javascript files (not needed, deepcheck flagged it as not used) - [x] Discover why app/selectors/accountTrackerController.test.tsx was triggering an issue on eslint - [x] Discover why we still have eslint issues here: e2e/pages/Settings/AesCryptoTestForm.ts (maybe we just need to convert it to JS since every e2e file is on JS ) - [x] Investigate if we should disable no-unused-vars for JS files since our efforts should be to transition those files to TypeScript (we didn't flag this until now, so let's keep this unused vars unchecked by the linter) - [x] Investigate if we should we enable empty functions on test files (we shouldn't) - [x] Remove unused dev package @metamask/eslint-config Next steps after this PR: - [ ] Remove the patch to @metamask/typescript-eslint-config (to remove it we need to bump @metamask/typescript-eslint-config and fix the eslint issues that came with it, this will need to be addressed on other PR) #11103 - [ ] Add @metamask/eslint-config and fix the issues that came by doing it around (10248 problems (10219 errors, 29 warnings) - #11102 5203 errors and 0 warnings potentially fixable with the --fix option.) - [ ] Address warnings that are shown when running `yarn lint` like `react/no-unstable-nested-components`, `jest/valid-expect` and `jest/no-disabled-tests` - #11100 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** https://github.com/user-attachments/assets/d195a93e-bccc-4b7b-b4c6-c55dcfa15565 <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: LeoTM <1881059+leotm@users.noreply.github.com>
- Loading branch information
1 parent
f1f7a4f
commit 6630da1
Showing
21 changed files
with
755 additions
and
769 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
652 changes: 326 additions & 326 deletions
652
app/component-library/components/Icons/Icon/Icon.assets.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
diff --git a/node_modules/@metamask/eslint-config-typescript/src/index.js b/node_modules/@metamask/eslint-config-typescript/src/index.js | ||
index 18b469e..63c6db8 100644 | ||
--- a/node_modules/@metamask/eslint-config-typescript/src/index.js | ||
+++ b/node_modules/@metamask/eslint-config-typescript/src/index.js | ||
@@ -42,7 +42,8 @@ module.exports = { | ||
{ allowDefinitionFiles: true }, | ||
], | ||
'@typescript-eslint/no-non-null-assertion': 'error', | ||
- '@typescript-eslint/no-parameter-properties': 'error', | ||
+ // no-parameter-properties is deprecating for this rule: https://typescript-eslint.io/rules/no-parameter-properties/ | ||
+ '@typescript-eslint/parameter-properties': 'error', | ||
'@typescript-eslint/no-require-imports': 'error', | ||
'@typescript-eslint/prefer-for-of': 'error', | ||
'@typescript-eslint/prefer-function-type': 'error', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.