Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Closed
Description
Repro
{"rules": {"@typescript-eslint/ban-types": ["error"] }}
functionisFunction(value:any):value isFunction{returntypeofvalue==='function';}
Expected Result
The tslint:recommended ruleset for ban-types includes Function
https://github.com/palantir/tslint/blob/master/src/configs/recommended.ts#L23
So I would expect it to be the same in @typescript-eslint/recommended.
I was unable to find any issues about it being intentionally removed.
Actual Result
Function type usage is not banned
Additional Info
To match TSLint I have to do this
"@typescript-eslint/ban-types": ["error", {"types": {"Function": {"message":"Prefer a specific function type, like `() => void`." } } }]
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin | 2.27.0 |
@typescript-eslint/parser | 2.27.0 |
TypeScript | 3.8.3 |
ESLint | 6.8.0 |
node | 13.12.0 |
npm | X.Y.Z |
yarn | 1.22.0 |