A prettier config with pre-commit hook has been added in #80, with the default configuration.
Some concerns regarding the formatting were raised in the following PRs: #98 #102.
- Sometimes classnames are on one line, sometimes one class per line
- Standalone tags get a trailing slash added
- Some tags get split with identation
<a[NEWLINE+INDENT]>some text</a[NEWLINE+INDENT]>
Since the introduction of the pre-commit hooks was positively received, I think that it is fair to state that having a preferred way to format the code is a nice thing to have.
However how this code should be formatted wasn't discussed at all.
The goal of this issue is to find a consensus regarding the formatting tool.
I see two possibilities:
- tweak the config of prettier (within its limitation, for instance https://github.com/prettier/prettier/issues/5246)
- or switch to another tool
Since I am personally happy with any configuration (as long as there is one :), my only must-haves for this consensus are:
- it should be able to format the most filetypes present in this repo (.ts, .js. .astro, .md)
- work as a pre-commit hook (probably possible for any tool)
@fsologureng @crystal @Ryuno-Ki since you raised concerns, what are your have "must-haves" or wishes regarding this issue? (btw, thank you for raising those concerns. If at least 3 people have spoken up about this issue it means that it is worth speaking about!)