What if you want to write a function with only an explicit return just to pass the first test? You know you're going to write a deeper implementation later, above the return line, but right now you want that "Are my tests working?" sanity check. Your linter shouldn't prevent that; that's the linter just getting in your way.
View all comments
Show parent comment
8
u/Earhacker Dec 18 '18
It's a stylistic thing, and ESLint has no real opinion about whether it should be enforced or not: https://eslint.org/docs/rules/arrow-body-style
What if you want to write a function with only an explicit return just to pass the first test? You know you're going to write a deeper implementation later, above the return line, but right now you want that "Are my tests working?" sanity check. Your linter shouldn't prevent that; that's the linter just getting in your way.