-
Notifications
You must be signed in to change notification settings - Fork 5.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 typescript to ~v5.3.3 (#22530)
This PR updates our typescript version to 5.3.3 (currently the latest version). It also updates some eslint and babel dependencies as the older versions didn't work with the newer version of typescript. There were some rule changes: 1. `jsdoc/check-line-alignment` now requires consistent line wrap indentation. This is a large change that I don't want to make in this PR (it should be separate and the commit added to a `.git-blame-ignore-revs` file). 2. `Object<...>` type syntax in jsdoc is not allowed; I fixes the breakages in this PR, as they were minimal 3. JS files that were checked using `typescript-eslint` aren't anymore. It is no longer permitted to apply `typescript-eslint` to files that are not also included in our `tsconfig.json`, and since our JS does not pass the typechecker I had to remove `typescript-eslint` from some JS rules. 4. We previously had a rule `jest/no-large-snapshots`, but it wasn't actually enforced. This eslint package updates fix the rule, but we don't even come close to passing it, so I turned it off 5. ui/store/actions.ts was beyond repair. I've enabled `@ts-nocheck` for the entire file. I do NOT volunteer as tribute to fix this. :-) I have also simplified and updated our `tsconfig.json` to remove redundant options and align it with the features and files that we use. I've also added compilation caching, which makes successive typescript linting much faster. See comments in `tsconfig.json`. I've merged our `.prettierignore` and `eslint` ignore lists together, as the two lists seem to have diverged over time. Our `eslintrc.js` now imports `.prettierignore` so they won't diverge again in the future. Our eslint config now fully parses our `tsconfig.json` and only applies `typescript-eslint` to `.ts` and `.tsx` files that our tsconfig.json lists (the `.js` files don't typecheck sucessfully, so they aren't included).
- Loading branch information
1 parent
80d0822
commit 8e00507
Showing
17 changed files
with
384 additions
and
394 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,9 +49,6 @@ notes.txt | |
.metamaskrc | ||
.metamaskprodrc | ||
|
||
# TypeScript | ||
tsout/ | ||
|
||
# Test results | ||
test-results/ | ||
|
||
|
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 |
---|---|---|
@@ -1,15 +1,18 @@ | ||
node_modules/** | ||
node_modules/**/* | ||
lavamoat/**/policy.json | ||
dist/** | ||
builds/** | ||
test-*/** | ||
coverage/ | ||
jest-coverage/ | ||
storybook-build/ | ||
dist/**/* | ||
builds/**/* | ||
test-*/**/* | ||
app/vendor/** | ||
.nyc_output/** | ||
test/e2e/send-eth-with-private-key-test/** | ||
.nyc_output/**/* | ||
test/e2e/send-eth-with-private-key-test/**/* | ||
*.scss | ||
development/chromereload.js | ||
development/ts-migration-dashboard/filesToConvert.json | ||
public | ||
development/ts-migration-dashboard/build/** | ||
public/**/* | ||
development/charts/** | ||
node_modules/**/* | ||
storybook-build/**/* | ||
jest-coverage/**/* | ||
coverage/**/* |
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.