Skip to content

Feat/prettier - #78

Merged
BuckyBuck135 merged 5 commits into
mainfrom
feat/prettier
Sep 23, 2026
Merged

BuckyBuck135 merged 5 commits into
mainfrom
feat/prettier

Conversation

@BuckyBuck135

Copy link
Copy Markdown
Collaborator

Adds Prettier formatting to the repo, based on the original attempt at this (PR #71 - thanks @vasfvitor), and makes it fully optional like every other feature in this kit.

  • Tooling: .prettierrc (tabs, prettier-plugin-astro for .astro files), .prettierignore, .editorconfig, .gitattributes (LF), format/format:check npm scripts, CI check on PRs/pushes to main.
  • Prevents repo-vs-personal editor conflicts: a committed .vscode/settings.json pins the Prettier extension as default formatter.
  • Removable: node scripts/remove-prettier.js, standalone or via npm run setup-project, strips the tooling without reformatting any source.
  • Mass reformat as its own commit, separate from the tooling commit
  • Version bump to 4.1.0 with a changelog entry also covering the two other merged fixes since 4.0.0 ( Restores getLocalizedRoute(), documents t() removal #75 Projects dropdown, Fix/theme-select-auto #77 dark mode Auto).

Ports the tooling from PR #71 (closed/stale after its beta base branch
was merged into main), plus adds a committed .vscode/settings.json so
a contributor's personal VSCode formatter/prettier settings can't
silently disagree with the repo's config:

- .prettierrc / .prettierignore: format config (tabs, per user
  preference; 2-space tab width, LF, prettier-plugin-astro for .astro)
- .editorconfig: editor-agnostic baseline (indent, charset, EOL,
  trailing whitespace) that also feeds Prettier's own defaults
- .gitattributes: normalize line endings to LF at the git level
- .vscode/settings.json: pins Prettier as the default formatter
  (including per-language overrides for .astro) and sets
  prettier.requireConfig so the extension always defers to this
  repo's config over a user's personal prettier.* settings; also
  un-ignores this file since it now needs to be shared, not personal
- .vscode/extensions.json: recommend the Prettier extension
- package.json: add format / format:check scripts and the new
  devDependencies
- .github/workflows/format.yml: CI check for format:check on PRs and
  pushes to main

No source files are reformatted yet in this commit; that follows as
its own commit so this diff stays reviewable.
Pure formatting — no logic changes. Run as its own commit (separate
from the tooling commit) so the diff stays reviewable and so this
commit's hash can later be added to a .git-blame-ignore-revs file.
- README: list npm run format / format:check in the Commands table
- .git-blame-ignore-revs: skip the mass-reformat commit in git blame
  (git config blame.ignoreRevsFile .git-blame-ignore-revs)
Standalone (node scripts/remove-prettier.js) and available from the
setup-project.js menu, matching the existing remove-i18n/remove-decap/
remove-demo/remove-dark-mode pattern:

- Removes .prettierrc, .prettierignore, .git-blame-ignore-revs,
  .vscode/settings.json, .github/workflows/format.yml
- Drops the Prettier entry from .vscode/extensions.json and restores
  the .gitignore rule for .vscode/settings.json (personal again, since
  nothing repo-mandated is left to enforce)
- Removes the format/format:check scripts and the two devDependencies
  from package.json directly (does not run npm itself, matching how
  the other remove-*.js scripts never touch npm/package.json)
- Removes the format script rows from README's Commands table
- Does NOT reformat existing source files — only removes the
  enforcement layer, same principle as remove-dark-mode.js not
  undoing unrelated changes

.editorconfig and .gitattributes are intentionally left in place —
neither is Prettier-specific, both remain useful without it.

Adds a `prettier` flag to featuresFlags.ts/FeatureFlags (starts true)
purely for setup-project.js's own bookkeeping; unlike the other flags
nothing in src/ ever reads it at runtime.
Changelog entry covers:
- PR #75: fixes the Projects nav item being rendered as a clickable
  link instead of a pure dropdown parent
- PR #77: fixes dark mode Auto flipping to light on navigation, and
  the Auto option's missing icon in the theme selector
- This branch's Prettier tooling addition (config, CI check, VSCode
  wiring, removable via remove-prettier.js/setup-project.js)
@netlify

netlify Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for advanced-astro-kit-i18n ready!

Name Link
🔨 Latest commit b008b8c
🔍 Latest deploy log https://app.netlify.com/projects/advanced-astro-kit-i18n/deploys/6ab3dfc93690f100081f4857
😎 Deploy Preview https://deploy-preview-78--advanced-astro-kit-i18n.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@BuckyBuck135
BuckyBuck135 merged commit 359c3a9 into main Sep 23, 2026
5 checks passed
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