Skip to content

Commit bbd017c

Browse files
committed
fix(setup): simplify first-run output
1 parent 87a9a87 commit bbd017c

6 files changed

Lines changed: 83 additions & 299 deletions

File tree

custom/v8s-links.txt

Lines changed: 0 additions & 80 deletions
This file was deleted.

custom/v8s-policies.json

Lines changed: 0 additions & 201 deletions
This file was deleted.

docs/adr/0001-use-release-please-and-semantic-versioning.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ predictable version numbers, changelog entries, and release notes so instance ow
1212
The code repository uses Conventional Commits for change intent. The repository also includes a GitHub Actions workflow
1313
at `.github/workflows/release-please.yml`.
1414

15-
The code repository has `npm run lint`, implemented by `scripts/lint.mjs`, and `npm run check`, which runs build, lint,
16-
and tests. It does not currently use an automatic formatter such as Prettier or Biome.
15+
The code repository has `npm run lint`, implemented by `scripts/lint.mjs`, and `npm run check`, which runs formatting,
16+
build, lint, and tests.
1717

1818
## Decision
1919

@@ -36,5 +36,4 @@ repositories should not publish vanityURLs product releases.
3636
- Product releases are repeatable and tied to commit intent
3737
- Instance owners can refer to release notes before upgrading
3838
- Conventional Commits matter for release automation, not just readability
39-
- Lint and test automation exist through npm scripts, but automatic formatting is intentionally not part of the current
40-
toolchain
39+
- Formatting, lint, build, and test automation exist through npm scripts
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# 0011. Use Prettier and a single check gate
2+
3+
Date: 2026-05-26
4+
5+
Status: Accepted
6+
7+
## Context
8+
9+
vanityURLs includes JavaScript, JSON, Markdown, HTML, CSS, TOML, and YAML files. Before this decision, the repository
10+
had custom linting and tests, but no automatic formatter. Formatting drift could show up late, and CI could not enforce
11+
the same style that maintainers use locally.
12+
13+
The project also needs one obvious command for local verification and CI/CD. Instance owners should not need to remember
14+
separate format, build, lint, and test commands before pushing.
15+
16+
## Decision
17+
18+
Use Prettier as the automatic formatter for supported text files.
19+
20+
Expose two explicit formatting commands:
21+
22+
- `npm run format` rewrites supported files with Prettier
23+
- `npm run format:check` verifies that supported files already match Prettier output
24+
25+
Keep `scripts/lint.mjs` as the project-specific lint layer for checks Prettier does not cover, including trailing
26+
newlines, JSON parse errors, JavaScript syntax checks, and vanityURLs-specific `wrangler.toml` expectations.
27+
28+
Make `npm run check` the single local and CI gate. It runs, in order:
29+
30+
1. `npm run format:check`
31+
2. `node scripts/build.mjs`
32+
3. `npm run lint`
33+
4. `npm test`
34+
35+
The GitHub Actions check workflow runs `npm ci` followed by `npm run check`.
36+
37+
## Consequences
38+
39+
- Formatting is deterministic locally and in CI
40+
- Maintainers can run `npm run format` before committing noisy style changes
41+
- `npm run check` remains the one command to run before pushing
42+
- Prettier does not replace project-specific linting or runtime tests
43+
- The installer can run the same check gate quietly and show a concise setup result

0 commit comments

Comments
 (0)