Commit 90a0396
authored
Follow
This rule comes from `typescript-eslint`:
https://typescript-eslint.io/rules/no-unsafe-function-type/
We don't have it enabled yet, but in v8 it's part of the "recommended"
preset:
https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#updated-configuration-rules
In order to keep the upgrade to that version as small as possible, this
change pre-emptively fixes code considered incorrect by that rule. The
only instance occurs in `EpicButton`, and would previously have been
caught by the `ban-types` rule, if that were not disabled for this line.
`ban-types` has been removed and replaced by `no-unsafe-function-type`
for this particular issue, hence why the error has reappeared:
https://typescript-eslint.io/blog/announcing-typescript-eslint-v8/#replacement-of-ban-types
We could update the `eslint-disable-next-line` comment, but there is a
more specific type that can be used in this case, as mentioned in the
documentation for the rule:
```ts
() => void;
```no-unsafe-function-type lint rule (#14696)1 parent 282cbf4 commit 90a0396
File tree
1 file changed
+1
-2
lines changed- dotcom-rendering/src/components/marketing/epics/ctas
1 file changed
+1
-2
lines changedLines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
48 | 47 | | |
49 | 48 | | |
50 | 49 | | |
| |||
0 commit comments