Skip to content

Add XML options to Prettier's Options type - #1060

Draft
ungaaaabungaaa wants to merge 1 commit into
prettier:mainfrom
ungaaaabungaaa:fix/xml-option-types
Draft

ungaaaabungaaa wants to merge 1 commit into
prettier:mainfrom
ungaaaabungaaa:fix/xml-option-types

Conversation

@ungaaaabungaaa

Copy link
Copy Markdown

Fixes #981. Thanks to @gtbuchanan for reporting the missing XML option types.

Importing the plugin now augments Prettier's Options with all four XML options and their valid values. Add a typed configuration example and a compiler regression test to the existing Jest suite. Formatter runtime files are unchanged.

Validation: the new test fails before the declaration change. Afterwards all 18tests / 11snapshots pass on Node 24.18.0; lint and formatting pass. All 18tests / 11snapshots also pass on Node 20.20.2 using the dependencies installed under Node 24. The packed plugin's types pass with Prettier 3.0.0 and 3.9.10, including invalid-value rejection and exact optional properties.

Draft / CI setup blocker: .github/workflows/main.yml selects Node 20, while the existing locked lint-staged@17.6.0 requires Node ≥22.22.1. A fresh frozen install fails on both this change and the unmodified base b252a6b. No engine check was bypassed and the workflow was not changed. Maintainer guidance or a compatible CI environment is needed before treating the PR as fully green.

Prepared with OpenAI Codex assistance, including code, tests, and this description.

Captured local validation report

Captured compiler and test output

This is a rendered report of captured local output, including the setup limitation. Evidence files are on a separate fork branch and are excluded from this PR.

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.

Add Prettier module augmentation for custom options

1 participant