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

Add rule that mimics --noImplicitAny compiler option #432

Closed
ajafff opened this issue Oct 10, 2018 · 1 comment
Closed

Add rule that mimics --noImplicitAny compiler option #432

ajafff opened this issue Oct 10, 2018 · 1 comment

Comments

@ajafff
Copy link
Member

ajafff commented Oct 10, 2018

As discussed in microsoft/TypeScript#8855 there's a big demand to enable --noImplicitAny on a per-file basis. As this will not be supported by the compiler, this proposes duplicating that behavior as a lint rule.

IMO this rule should not be part of the recommended preset. If --noImplicitAny is already enabled the rule does nothing.

TODO:

  • there are some differences in type inference depending on --noImplicitAny -> find out which and if we need to warn in these cases too.
  • IIRC there was a PR to allow element access on a fresh object literal without index signature, but I can't find it right now.

Ref: palantir/tslint#4215

@ajafff
Copy link
Member Author

ajafff commented Dec 5, 2018

Is this still needed, now that microsoft/TypeScript#27693 added noImplicitAny errors as suggestions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant