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.
Problem
The plugin's custom options (
xmlWhitespaceSensitivity,xmlSelfClosingSpace,xmlSortAttributesByKey,xmlQuoteAttributes) are not typed on Prettier'sOptionsinterface. Consumers get no autocomplete or type narrowing for these options in TypeScript Prettier configs.Other Prettier plugins (e.g.
prettier-plugin-sort-json) include adeclare module 'prettier'augmentation:Expected behavior
Importing the plugin should augment Prettier's
Optionsinterface with the plugin's custom options, providing autocomplete and type safety in TypeScript configs.