Skip to content

Missing Converter for typedef #937

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

Closed
rgant opened this issue Jan 28, 2021 · 2 comments · Fixed by #1370
Closed

Missing Converter for typedef #937

rgant opened this issue Jan 28, 2021 · 2 comments · Fixed by #1370
Labels
area: missing converter A rule converter should exist but doesn't yet. status: accepting prs Please, send in a PR to resolve this! ✨

Comments

@rgant
Copy link

rgant commented Jan 28, 2021

💥 Missing Converter

  • tslint-to-eslint-config version: 2.1.0
  • typescript-eslint version: 4.14.1

TSLint Rule Name

  • tslint-to-eslint-config does not know the ESLint equivalent for TSLint's "typedef".

Package Source

https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/typedef.md

@JoshuaKGoldberg
Copy link
Member

JoshuaKGoldberg commented Feb 17, 2021

Indeed! https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-function-return-type.md also exists and, depending on the source TSLint typedef settings, should probably be used in the output rules.

@JoshuaKGoldberg JoshuaKGoldberg added area: missing converter A rule converter should exist but doesn't yet. status: accepting prs Please, send in a PR to resolve this! ✨ labels Feb 17, 2021
@KingDarBoja
Copy link
Collaborator

The original rule at TSLint: https://palantir.github.io/tslint/rules/typedef/

@KingDarBoja KingDarBoja self-assigned this May 10, 2021
JoshuaKGoldberg pushed a commit that referenced this issue Feb 28, 2022
* feat: Add converter for `typedef` rule (#937)

* style: Condense repetitive code

This also uses `Set` to improve time complexity of searching to `O(n)`
time

* test: Fix to use `@jest/globals`

* test: Add case for all argument conversions

* feat: Complete `typedef` support

This adds full support to `explicit-function-return-type` and
`explicit-module-boundary-type`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: missing converter A rule converter should exist but doesn't yet. status: accepting prs Please, send in a PR to resolve this! ✨
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants