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

typescript-eslint/prefer-function-type might be enough for prefer-method-signature #936

Open
rgant opened this issue Jan 28, 2021 · 1 comment
Labels
area: missing converter A rule converter should exist but doesn't yet. status: in discussion This issue needs more discussion before code changes

Comments

@rgant
Copy link

rgant commented Jan 28, 2021

🐛 Bug Report

  • tslint-to-eslint-config version: 2.1.0
  • ESLint version: 7.18.0
  • Node version: 12.18.0

Actual Behavior

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

Expected Behavior

Use https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/prefer-function-type.md for this rule.

Reproduction

tslint.json:

{ "rules": { "prefer-method-signature": true } }
@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! ✨ status: in discussion This issue needs more discussion before code changes and removed status: accepting prs Please, send in a PR to resolve this! ✨ labels Feb 17, 2021
@JoshuaKGoldberg
Copy link
Member

Thanks for reporting @rgant!

Looking through the docs, it seems like the TSLint prefer-method-signature rule looks at the methods declared on objects, while the typescript-eslint prefer-function-type rule is more about using a type = ? Is there much overlap between them?

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: in discussion This issue needs more discussion before code changes
Projects
None yet
Development

No branches or pull requests

2 participants