tslint-to-eslint-config icon indicating copy to clipboard operation
tslint-to-eslint-config copied to clipboard

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

Open rgant opened this issue 4 years ago • 1 comments

🐛 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 } }

rgant avatar Jan 28 '21 16:01 rgant

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?

JoshuaKGoldberg avatar Feb 17 '21 03:02 JoshuaKGoldberg