Skip to content

Core: migrate prettier → gjsify format (Biome)#97

Merged
JumpLink merged 4 commits into
mainfrom
chore/migrate-prettier-to-biome
May 20, 2026
Merged

Core: migrate prettier → gjsify format (Biome)#97
JumpLink merged 4 commits into
mainfrom
chore/migrate-prettier-to-biome

Conversation

@JumpLink
Copy link
Copy Markdown
Owner

Summary

Replaces prettier with Biome (via gjsify format / gjsify fix), closing the last Node-tooling dependency in the format/lint pipeline.

  • Adds biome.json matching the prettier config (2-space JS/TS, double quotes, semicolons, trailingCommas: es5). Excludes references/, flatpak-build/, .yarn/, generated assets via files.includes + vcs.useIgnoreFile: true (skips submodules cleanly).
  • Replaces format / check:format scripts with gjsify format / gjsify format --check; adds fix (combined format + safe-lint-fix + organize-imports).
  • Drops prettier devDep, prettier.config.js, .prettierignore, .yarn/sdks/prettier (was the Yarn-PnP shim for VSCode).
  • Switches VSCode default formatter from esbenp.prettier-vscodebiomejs.biome (settings.json + recommended extensions).
  • Bumps @gjsify/cli: root ^0.4.13^0.4.14; app-gnome (+ blueprint/gettext vite plugins) ^0.3.16^0.4.14.

Why

@gjsify/cli v0.4.14 ships gjsify format / gjsify lint / gjsify fix (native Biome binary spawn, no Node launcher — gjsify/gjsify#200). This makes the GJS app's format-drift gate Node-free at runtime, and uses the same biome.json style across all gjsify-consuming projects.

CI behavior is unchanged: yarn check:format is still the format-drift gate, now backed by Biome instead of prettier.

Test plan

  • CI green (yarn check:format no longer references prettier)
  • Local yarn install && yarn check:format succeeds
  • Local yarn format round-trips without diffs on already-formatted files
  • VSCode default formatter picks up Biome via the updated settings.json

JumpLink added 3 commits May 19, 2026 12:10
- Add biome.json (2-space JS/TS, double quotes, semicolons, trailingCommas:es5
  — matches the prettier config we're replacing). Excludes references/,
  flatpak-build/, .yarn/, etc. via files.includes.
- Replace `format` / `check:format` scripts with `gjsify format`/`format --check`;
  add `fix` script for combined format+lint+import-sort.
- Drop prettier devDep + prettier.config.js + .prettierignore +
  .yarn/sdks/prettier (was the Yarn-PnP shim for VSCode).
- Switch VSCode default formatter from esbenp.prettier-vscode → biomejs.biome
  (settings.json + recommended extensions list).
- Bump @gjsify/cli ^0.4.13 → ^0.4.14 (root) and ^0.3.16 → ^0.4.14 (app-gnome,
  vite-plugin-blueprint, vite-plugin-gettext) to pick up `gjsify format`/`fix`.

CI is unchanged: `yarn check:format` continues to be the format-drift gate,
now backed by Biome's native binary instead of prettier.
Adds a `vcs` block so Biome honors `.gitignore` + `.gitmodules` boundaries
during its file walk. Combined with the existing `files.includes` bang
patterns this prevents Biome from descending into `references/` (311 MB of
NativeScript reference apps, our largest submodule by far), which previously
made `gjsify format --check` walk an unnecessarily large tree even though the
result was filtered.

No behavior change for files we actually format — both layers (vcs +
includes) are belt-and-suspenders for the same exclusion set.
Format-drift cleanup after the prettier → Biome migration. Biome's
defaults differ from prettier on a few inlining heuristics (shorter
function signatures inline when they fit lineWidth=120, single-line
imports when destructured names are short), which the CI Code-Quality
gate caught. Running `biome format --write` once across the tree to
land Biome's canonical output, so subsequent `gjsify format --check`
runs find zero drift.

Also: enable `css.parser.tailwindDirectives` so Biome parses NativeScript
+ Tailwind CSS files in `packages/app-android/app/` (the `@tailwind`,
`@layer`, `@apply` directives are non-standard CSS and previously caused
4 parse-errors → format aborted). With the flag set the suite formats
cleanly.

No semantic changes — formatter-only edits.
@JumpLink JumpLink merged commit 971be9c into main May 20, 2026
2 checks passed
@JumpLink JumpLink deleted the chore/migrate-prettier-to-biome branch May 20, 2026 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant