async-labs / builderbook

Open source web application to learn JS stack: React, Material-UI, Next.js, Node.js, Express.js, Mongoose, MongoDB database.
https://builderbook.org
MIT License
3.77k stars 893 forks source link

ESLint auto format isn't working properly #438

Closed mathisrenier closed 3 years ago

mathisrenier commented 3 years ago

I have cloned the new codebase and created a test.jsx file in 1-end, similar to the one described in the book.

[1, 2, 3].map(function (x) { const y = x + 1; return x * y; });

Hitting Ctrl+s corrects the tabs spacing and adds a new line after the bloc of code, but the function isn't formatted to an arrow function. I still get a warning "Unexpected unnamed function".

klyburke commented 3 years ago

@mathisrenier Thanks for reporting. We are looking into this issue and a good fix.

In the meantime, you can take a look at #434 by @johnmalcolm.

klyburke commented 3 years ago

@mathisrenier This has now been resolved by #439 by @johnmalcolm

mathisrenier commented 3 years ago

Great thanks!