prettier / prettier/plugin-xml
Add Prettier module augmentation for custom options
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 278
- Forks
- 46
- Avg merge
- 1m
- Merged PRs (30d)
- 13
Description
Problem
The plugin's custom options (xmlWhitespaceSensitivity, xmlSelfClosingSpace, xmlSortAttributesByKey, xmlQuoteAttributes) are not typed on Prettier's Options interface. Consumers get no autocomplete or type narrowing for these options in TypeScript Prettier configs.
Other Prettier plugins (e.g. prettier-plugin-sort-json) include a declare module 'prettier' augmentation:
declare module 'prettier' {
interface Options {
xmlWhitespaceSensitivity?: 'strict' | 'preserve' | 'ignore' | undefined;
xmlSelfClosingSpace?: boolean | undefined;
// ...other options
}
}
Expected behavior
Importing the plugin should augment Prettier's Options interface with the plugin's custom options, providing autocomplete and type safety in TypeScript configs.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the plugin's package entry and any existing type declaration files, then inspect how its custom options are exposed to Prettier. Add the module augmentation for all four options and verify that TypeScript configs receive autocomplete and type checking for them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100