Use a code formatter
Implementing a formatter like Prettier or Biome would help maintain better consistency in code style. Although standard.js already handles the style, it's only for JavaScript. It would be better to have a tool capable of maintaining consistency in HTML, CSS, or any other language in the repository as well.
cc: @crandmck
I'd be open to this since we are the only main contributors working right now, and it'd make for a better developer experience. But its a non trivial amount of work to maintain formatting across a team of many people.
It would either help us get rid of prettifying junk in our PRs, or it could make it worse.
Not a bad suggestion though!
This is reasonable, but I'm not sure it's worth the effort. I have some other suggestions that might have more value--will try to find time to put them in an issue.
btw, we’re not actually using a linter or a formatter for the .js files. ESLint is only being used for the code blocks inside markdown files. Additionally, in tests, it didn’t work well to use Prettier for general use because we’re using Liquid, which makes Prettier act a bit erratically. Hopefully, we can solve this issue in the future.
@expressjs/docs-wg what do you think about using Prettier to initially format the CSS?
I like the idea of using a formatter, and for main contributors it should be pretty straightforward since we're using this code frequently, and can debug it. But it can be annoying when someone clones the repo and the formatter doesn't work and needs a bunch of debugging. Happens to me sometimes.
How much effort would it take to maintain it being in the workflow? I'm pro-formatter overall though.