Bump Typescript, @typescript-eslint, eslint-plugin-jest, eslint-plugin-testing-library and update tests and definitions #1193
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR supersedes #1186 and #1166
This PR originated from a bug noticed by @cangarugula, where our Typescript svg definitions were not working. I discovered that the problem happens only with
typescript@>4.5.0 <=4.5.2
. Additionally, I discovered that the tilde definition of our typescript dependency conflicts with@typescript-eslint
(yarn lint
printing warnings), now that4.5
is out.There are two possible ways of fixing this: the easy one is constricting our
typescript
dependency to be strictly less than4.5.0
and dealing with excluding the faulty versions later (https://github.com/jpmorganchase/modular/pull/1166/files). The longer one is to upgrade typescript, force it to be greater or equal to than4.5.3
to exclude the faulty versions and update all the incompatible dependencies (this PR).This PR updates:
@typescript-eslint
to the latest version + fixes manyany
definitions that are not allowed any moreeslint-plugin-jest, eslint-plugin-testing-library
to the latest version + fixes test expectations to align with it (egtoEqual
becomestoBe
etc)This is breaking, since we're bumping
modular-scripts
to use a stricter linter that can break builds and tests.