Core: migrate prettier → gjsify format (Biome)#97
Merged
Conversation
- 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.
3 tasks
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces prettier with Biome (via
gjsify format/gjsify fix), closing the last Node-tooling dependency in the format/lint pipeline.biome.jsonmatching the prettier config (2-space JS/TS, double quotes, semicolons,trailingCommas: es5). Excludesreferences/,flatpak-build/,.yarn/, generated assets viafiles.includes+vcs.useIgnoreFile: true(skips submodules cleanly).format/check:formatscripts withgjsify format/gjsify format --check; addsfix(combined format + safe-lint-fix + organize-imports).prettierdevDep,prettier.config.js,.prettierignore,.yarn/sdks/prettier(was the Yarn-PnP shim for VSCode).esbenp.prettier-vscode→biomejs.biome(settings.json + recommended extensions).@gjsify/cli: root^0.4.13→^0.4.14;app-gnome(+ blueprint/gettext vite plugins)^0.3.16→^0.4.14.Why
@gjsify/cliv0.4.14 shipsgjsify 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 samebiome.jsonstyle across all gjsify-consuming projects.CI behavior is unchanged:
yarn check:formatis still the format-drift gate, now backed by Biome instead of prettier.Test plan
yarn check:formatno longer references prettier)yarn install && yarn check:formatsucceedsyarn formatround-trips without diffs on already-formatted filessettings.json