Feat/prettier - #78
Merged
Merged
Conversation
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)
✅ Deploy Preview for advanced-astro-kit-i18n ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
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.