JamieMason / eslint-plugin-prefer-arrow-functions

Auto-fix plain Functions into Arrow Functions, in all cases where conversion would result in the same behaviour
https://www.npmjs.com/package/eslint-plugin-prefer-arrow-functions
MIT License
43 stars 11 forks source link

Emit return type when fixing #14

Closed harelmo closed 2 years ago

harelmo commented 2 years ago

Description (What)

Fixes #2

Justification (Why)

Supporting TS return types that is currently missing (only argument types are preserved when using --fix)

How Can This Be Tested?

Added the TS compiler to the tests, to allow parsing TS AST correctly. Added relevant test cases to follow all the existing JS cases, just with TS syntax.

harelmo commented 2 years ago

@JamieMason please take a look when you get the chance 🙏