-
Notifications
You must be signed in to change notification settings - Fork 101
Description
🐛 Bug Report
tslint-to-eslint-configversion: 0.5.1- ESLint version: 6.8.0
- Node version: 8.17.0
Actual Behavior
arrow-return-shorthand is converted to arrow-body-style automagically without any warning.
Expected Behavior
Conversion should produce a message about an incompatible use case - when arrow function body is multiline and using curly brackes, but has only one line which returns the result immediately, arrow-return-shorthand doesn't yield an error (unless "multiline" is specified), while arrow-body-style produces an error, suggesting that the result could be returned using the short notation.
I agree that this use case is rather arguable, but in my organization, there's a huge monorepo where such use case is a pattern which is already in place, and it took me a while to figure out what exactly caused the mismatch. Some warning message instead would've been nice 🙂
In my case, I actually commented this rule out, until further development of things (either will refactor the code, or maybe the rule will add compatibility support for this case), but I imagine it would be helpful for others as well.
Reproduction
https://github.com/Zip753/arrow-return-shorthand-migration-repro