Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Description
Suggestion
Forking out of#8173 (comment):
@JoshuaKGoldberg: ... we keep the@typescript-eslint/explicit-function-return-type rule enabled.
@bradzacher: We could probably relax that.
I'd be okay with us doing isolatedDeclarations instead of EFRT.
I'd be in favor of moving to a lighter-weight enforcement of function return types internally. My understanding of the context is that we've traditionally enforced function return types for these reasons:
- To be explicit in types as a stylistic point - holding over from when this was much more common, years ago
- Type performance: since we're a non-trivial sized repo, it saves time in TypeScript type checking
- Type stability: i.e. whatTypeScript 5.5's
isolatedDeclarations
enforces
Now thatisolatedDeclarations
are stable, it seems reasonable to me that we'd switch our internal linting to only enforcing what it requires. We'd get the type performance and stability, without the more heavy-handed stylistic requirements. Our non-exported functions would now be able to have inferred return types! What does the team think?
Note that this is only for theinternal linting of this repository. This issue doesn't impact end-users of typescript-eslint.
💖