Skip to content
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

[no-explicit-any] ignores generic in function definition #64

Closed
nstepien opened this issue Jan 8, 2019 · 2 comments · Fixed by #68
Closed

[no-explicit-any] ignores generic in function definition #64

nstepien opened this issue Jan 8, 2019 · 2 comments · Fixed by #68
Labels
bug Something isn't working package: parser Issues related to @typescript-eslint/parser

Comments

@nstepien
Copy link
Contributor

nstepien commented Jan 8, 2019

Repro

function test<T extends Partial<any>>() {}

const test = <T extends Partial<any>>() => {};

Expected Result
any should not be allowed there with the rule no-explicit-any enabled.
Actual Result
any is not detected.

Versions

package version
eslint-plugin-typescript 0.14.0
typescript-eslint-parser 21.0.2
typescript 3.2.2
@armano2
Copy link
Member

armano2 commented Jan 8, 2019

Issue is related to parser, and it got fixed in eslint/typescript-eslint-parser#592

@nstepien nstepien changed the title no-explicit-any ignores generic in function defintion no-explicit-any ignores generic in function definition Jan 8, 2019
@bradzacher bradzacher changed the title no-explicit-any ignores generic in function definition [no-explicit-any] ignores generic in function definition Jan 8, 2019
@JamesHenry JamesHenry transferred this issue from bradzacher/eslint-plugin-typescript Jan 18, 2019
@bradzacher bradzacher added bug Something isn't working package: parser Issues related to @typescript-eslint/parser package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin and removed package: parser Issues related to @typescript-eslint/parser labels Jan 18, 2019
@bradzacher
Copy link
Member

Should have a test case added to the plugin if this is fixed.

@bradzacher bradzacher added migration-test package: parser Issues related to @typescript-eslint/parser and removed package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin labels Jan 18, 2019
@typescript-eslint typescript-eslint locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working package: parser Issues related to @typescript-eslint/parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants