Skip to content

Disallow arrow function return type hints#1860

Merged
kukulich merged 1 commit into
slevomat:masterfrom
simPod:feat/disallow-arrow-function-return-typehint
Jul 21, 2026
Merged

Disallow arrow function return type hints#1860
kukulich merged 1 commit into
slevomat:masterfrom
simPod:feat/disallow-arrow-function-return-typehint

Conversation

@simPod

@simPod simPod commented Jul 5, 2026

Copy link
Copy Markdown
Contributor
  • Adds optional default-disabled disallowReturnTypeHint setting to ArrowFunctionDeclarationSniff.
  • Reports fixable return type hints on arrow functions when enabled.
  • Removes the colon/type hint while preserving arrow spacing.
  • Updates focused sniff tests, fixtures, and documentation for the new setting.

@simPod
simPod force-pushed the feat/disallow-arrow-function-return-typehint branch from ac10bb1 to 5caa34b Compare July 5, 2026 09:16
@simPod
simPod marked this pull request as ready for review July 5, 2026 10:19
@simPod

simPod commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@kukulich in case you missed this one

@kukulich

Copy link
Copy Markdown
Contributor

@simPod I'm sorry. Will check tonight.

@kukulich

Copy link
Copy Markdown
Contributor

I don't understand the reason 🤷‍♂️ but the PR looks good.

@kukulich
kukulich force-pushed the feat/disallow-arrow-function-return-typehint branch from 5caa34b to a479751 Compare July 21, 2026 16:11
@kukulich
kukulich enabled auto-merge (rebase) July 21, 2026 16:11
@kukulich
kukulich merged commit b1e077d into slevomat:master Jul 21, 2026
40 checks passed
@simPod
simPod deleted the feat/disallow-arrow-function-return-typehint branch July 21, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants