Proposal to replace Clang Format with ESLint and Prettier in phosphor-webui
Derick
derick.montague at gmail.com
Sat Jun 15 14:55:54 AEST 2019
> If you think the google config
> makes you more efficient, by all means, I can get behind it, that just
> wasn't my experience.
Where I find it valuable is the visual indicators that happen when
integrated into the editor. It helps hunt down small problems that
often cause big issues, but are hard to spot.
> Did you find any patterns that the UI
> consistently got wrong?
Mostly just inconsistencies in formatting, but there were some
syntax errors that prettier just fixed for us, unnecessary semi-colons
is one example.
> Were there checks that identified real
> functional issues in the webui (memory leaks, bad pages, race
> conditions, ect)
No
> I'm scrolling through your changeset, and most of it seems like
> whitespace.
It was mostly with exception to some syntax errors. In the update
to the Gerrit review, I removed all the files I formatted, so running
eslint on the app folder will reveal them. I will go in and resolve
those issues in a different patch.
> All in all, if this is something you want, I can get behind it.
Thank you! I don't want to stretch this conversation out. I have found
a win-win.
We can keep the formatting in place using clang-format. ESLint can provide
basic fixes, like removing trailing commas and flagging syntax and potential
issues without impacting the build. We can use prettier only for SCSS.
More information about the openbmc
mailing list