mumble-voip / mumble-www

The Mumble website
https://www.mumble.info
Other
12 stars 17 forks source link

Introduce autoformatter #212

Open Krzmbrzl opened 1 month ago

Krzmbrzl commented 1 month ago

This uses Prettier simply because it was the first formatter I found that works with Markdown

Krzmbrzl commented 1 month ago

Are contributors expected to install this util?

Not necessarily - they can also manually adjust their formatting.

I see it's a nodeJS util, and the CI checks, does not fixup.

I believe the CI can be configured to do fixups but I usually prefer not splitting change and formatting commits (e.g. have only a single commit that is already formatted). Though I guess for the website having a super clean commit history is not too important so maybe auto-fixing (on request) is fine.

I don't have NodeJS installed, nor do I want to.

If you have a suggestion for a different Markdown formatter, I'd be open to change to that. It's just that Prettier was the only I could find (though I didn't do an extensive search)

Kissaki commented 3 weeks ago

Sorry for the delay.

Do you have a sample report/error result? A CI run of it?

I wouldn't add the line length limit after all. There's not necessarily an appropriate formatter available in editing contexts. The markdown files can be considered source code rather than be read as such. Even then on rendering like on GitHub they're not too wide. I prefer manually laying it out, often on sentence borders.

I'm used to * lists, not - lists. It's rendered as bullets after all as well.

Dunno why " is preferred over ' for a head string. Seems to me like ' would be the more deliberately restrictive quoting.

Or why inline-html is line-broken. I prefer line to be a line.

Either way, if you want to merge as is, feel free to. If I end up editing and if it'd actually end up cumbersome I can always raise an issue. :)

It does make me wonder now though, what's the gain in this strict formatting. I'm just a bit worried it's more annoyance than useful.

Kissaki commented 3 weeks ago

For context, in VS Code I use MarkdownLint https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint

and I guess it has different (default) rules

Apparently, there's also a GH action of it https://github.com/marketplace/actions/markdownlint-cli2-action