Skip to content

fix: support prettier 3.9+ and resolve multi-plugin conflicts - #272

Merged
fardad-dev merged 1 commit into
fardad-dev:masterfrom
rootreeweb:fix/prettier-3.9-compatibility
Oct 25, 2026
Merged

fardad-dev merged 1 commit into
fardad-dev:masterfrom
rootreeweb:fix/prettier-3.9-compatibility

Conversation

@mirite

@mirite mirite commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

  1. Prettier 3.9 Built-in Plugin Resolution:

    • Prettier 3.9 replaced builtin-plugins-proxy.js with explicit lazy-load plugins with assigned .name strings ('typescript', 'babel', etc.), causing findPluginByParser to inadvertently select Prettier's built-in parsers instead of preceding third-party plugins.
    • Filtered out all 13 built-in plugin names and uninitialized lazy loaders, and updated parser lookup to search backwards matching Prettier's findLast semantics.
  2. Re-entrant Plugin Delegation & Chaining:

    • Replaced boolean recursion guards with WeakMap<ParserOptions, number> cursor tracking.
    • Allows chaining plugins (e.g. prettier-plugin-tailwindcss) and preceding plugins (e.g. import organizers) to re-enter and step through preceding parser stages without infinite loops or dropped passes.
  3. Trailing Whitespace on Descriptionless Tags:

    • Trimmed trailing padding on tags without an inline description (e.g. @returns {undefined}), preventing Prettier 3.9 from interpreting trailing spaces as Markdown hard line breaks.
  4. Testing & CI:

    • Added regression test suite verifying multi-plugin ordering (compatibleWithPlugins.test.ts).
    • Added Prettier 3.9 to GitHub Actions test matrix.

@fardad-dev
fardad-dev merged commit 6f1f30a into fardad-dev:master Oct 25, 2026
9 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.

2 participants