Typescript-eslint: [typedef] What is ETA of the typedef rule?

Created on 27 May 2019  路  3Comments  路  Source: typescript-eslint/typescript-eslint

I'm thinking of migrating from TSLint to ESLint. Reading the roadmap, I realized the typedef rule is still "unimplemented".

Is there any plan to implement this rule? If yes, do we have any ETA?

Thank you!

new plugin rule has pr eslint-plugin

Most helpful comment

As an FYI there is an open PR to add the typedef rule (#581).
It is under discussion though.

All 3 comments

If I'm understanding that rule, then it looks like it can be "implemented" as follows:

  • turn on noImplicitAny in your tsconfig.
  • turn on our rule @typescript-eslint/explicit-function-return-type.

There are a two options not covered by the above though: object-destructuring and array-destructuring.
Happy for someone to add those in if they want, but I see those as a low value additions - it's a type pattern that i've never actually seen used before.

@bradzacher a follow up to the above reference, we are using the suggested and it appears to cover our use case.

As an FYI there is an open PR to add the typedef rule (#581).
It is under discussion though.

Was this page helpful?
0 / 5 - 0 ratings