Skip to content

docs(eslint-plugin): [prefer-function-type] mention global augmentation edge case in docs #6604

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/eslint-plugin/docs/rules/prefer-function-type.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,8 @@ type Intersection = ((data: string) => number) & ((id: number) => string);
## When Not To Use It

If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can disable this rule.

This rule has a known edge case of sometimes triggering on global augmentations such as `interface Function`.
These edge cases are rare and often symptomatic of odd code.
We recommend you use an [inline ESLint disable comment](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1).
See [#454](https://github.com/typescript-eslint/typescript-eslint/issues/454) for details.
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy