Skip to content

fix: make astroAllowShorthand more intuitive - #493

Merged
Princesseuh merged 5 commits into
mainfrom
fix/astro-allow-shorthand-false
Sep 24, 2026
Merged

Princesseuh merged 5 commits into
mainfrom
fix/astro-allow-shorthand-false

Conversation

@Princesseuh

@Princesseuh Princesseuh commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Changes

This changes how astroAllowShorthand work to be more intuitive. Previously, a value of false would not transform back shorthands into explicit forms, despite the name suggesting the reverse. This PR implements a tri-state solution where undefined just let things stay as they are, and true and false respectively choose which form to prefer when possible.

Fixes #492

Testing

Added tests

Docs

The README and types were updated

@changeset-bot

changeset-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 79a1293

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
prettier-plugin-astro Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Princesseuh
Princesseuh force-pushed the fix/astro-allow-shorthand-false branch 2 times, most recently from fcfa43f to 7ae8c62 Compare September 24, 2026 12:09
@Princesseuh Princesseuh changed the title fix: honor astroAllowShorthand false fix: honor astroAllowShorthand tri-state Sep 24, 2026
@Princesseuh
Princesseuh force-pushed the fix/astro-allow-shorthand-false branch from 7ae8c62 to 71e4f18 Compare September 24, 2026 12:54
Comment thread src/options.ts Outdated
Comment thread src/options.ts Outdated
Comment thread .changeset/bright-foxes-smile.md Outdated
@Princesseuh
Princesseuh marked this pull request as ready for review September 24, 2026 13:14
@Princesseuh Princesseuh changed the title fix: honor astroAllowShorthand tri-state fix: make astroAllowShorthand more intuitive Sep 24, 2026

@florian-lefebvre florian-lefebvre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@Princesseuh
Princesseuh merged commit bfbb6c5 into main Sep 24, 2026
6 checks passed
@Princesseuh
Princesseuh deleted the fix/astro-allow-shorthand-false branch September 24, 2026 13:24
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.

🐛 BUG: astroAllowShorthand: true is not optional (but that's okay)

2 participants