diff options
| author | ojacobson <ojacobson@noreply.codeberg.org> | 2025-06-10 00:43:57 +0200 |
|---|---|---|
| committer | ojacobson <ojacobson@noreply.codeberg.org> | 2025-06-10 00:43:57 +0200 |
| commit | 71919b461f25bed1bb4708b0494d603de373ae11 (patch) | |
| tree | c6fa8e3f4dc6200dbda83fe5257b5631f59bed22 /tools/reformat | |
| parent | 2273b6dce6cb650c0a72b71491421f198518bfb7 (diff) | |
| parent | bf1ef354817dba47cc955e9654dc204f0dc07d27 (diff) | |
Rework project formatting tools.
* Changes JS formatting policy to expect trailing commas in most of the places they're allowed.
* Moves format checking out of `npm` and into tool scripts.
* _Documents_ formatting tools, as well as a shot at a policy for format-only changes designed to alleviate low-value review.
This was originally part of [another proposal][pr-6]. I've broken it out to make the intent clearer, and to make the proposal easier to get a handle on in isolation from other, related changes. Thanks to @wlonk for their input on this!
[pr-6]: https://codeberg.org/ojacobson/pilcrow/pulls/6
Merges prop/project-formatting into main.
Diffstat (limited to 'tools/reformat')
| -rwxr-xr-x | tools/reformat | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/reformat b/tools/reformat new file mode 100755 index 0000000..4dfe7c3 --- /dev/null +++ b/tools/reformat @@ -0,0 +1,10 @@ +#!/bin/bash -e + +## tools/reformat +## +## Automatically reformats code in this project to match the project style. + +cd "$(dirname "$0")/.." + +npx prettier --write . +cargo fmt --all |
