Conflict when i save my file(EsLint + Prittier formater)

331 Views Asked by At

I have that arrow function enter image description here

I have this error in my file. To fix this error, I can return it like this => {return ...}, or just put parentheses around what is inside the arrow function

When I do that the error disappears, but if I save the file it goes back to the way it is in the photo. Where do I remove this setting?

If I return like this => {return ...} or => ( ), I would like it to stay, not for it to remove the parentheses or change the arrow function with curly braces to parentheses

Obs: Put // eslint-disable-next-line no-confusing-arrow is not an option

1

There are 1 best solutions below

3
On

You might try replacing your ? conditionals with ||

ESLint `no-confusing-arrow` "--fix" formatting conflict on save, with Prettier?