Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Repo: Switch from explicit-function-return-type to isolatedDeclarations and/or explicit-module-boundary-type #9419

Closed
Labels
locked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docsteam assignedA member of the typescript-eslint team should work on this.
@JoshuaKGoldberg

Description

@JoshuaKGoldberg

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'sisolatedDeclarations 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.

💖

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked due to agePlease open a new issue if you'd like to say more. See https://typescript-eslint.io/contributing.repo maintenancethings to do with maintenance of the repo, and not with code/docsteam assignedA member of the typescript-eslint team should work on this.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp