You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This involved some dependency updates, including updating
`typescript-eslint` from v7 to v8, which came with a number of breaking
changes, detailed here:
https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/
The first set of changes required to handle this were to our ESLint
config.
`no-var-requires` has been deprecated in favour of `no-require-imports`,
and the former has been replaced by the latter in the `recommended`
preset, which `guardian/eslint-config-typescript` extends. However, we
had the former turned off, so this updates our config to turn the latter
off instead. See:
- https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#rule-breaking-changes
- https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#updated-configuration-rules
`ban-types` has been removed and replaced with `no-restricted-types`,
`no-empty-object-type`, `no-unsafe-function-type` and
`no-wrapper-object-types`. Previously we used `extendDefaults` to
include the latter three rules. That option no longer exists, but
they're included in the `recommended-type-checked` preset, which
`guardian/eslint-config-typescript` extends, so they should still be
present in our config. The remainder of our `ban-types` config involved
banning a list of configurable types, which is now handled by
`no-restricted-types`. See:
- https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#replacement-of-ban-types
- https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#updated-configuration-rules
The second set of changes are to our source files, to fix issues
surfaced by the rule changes. These have pre-emptively been handled in
earlier commits, and amount to following these rules:
- `no-unused-expressions`
- `prefer-promise-reject-errors`
- `no-empty-object-type`
- `no-unsafe-function-type`
There is one exception to this, where `prefer-promise-reject-errors` has
been disabled for a particular issue in AR.
0 commit comments