A Prettier plugin that adds support for formatting .properties files, version 0.3.1, with a stable release cadence and active maintenance. It integrates with Prettier v2.3 and later, providing dedicated formatting for Java-style property files. Key differentiators include support for escape non-Latin-1 characters (for ISO-8859-1 encoding) and customizable key-value separators (space, colon, equals with various spacing). Unlike generic formatters, this plugin understands the .properties syntax, handling comments, multi-line values, and Unicode escaping correctly.
npm install prettier-plugin-propertiesVerified import paths — ran on the pinned version, not inferred.
Shows installation, configuration with options, and formatting of a .properties file.
Add 'prettier-plugin-properties' to the plugins array in .prettierrc or use --plugins in CLI.
Upgrade Prettier to 2.3+ and Node to 18+.
No action needed; upgrade to v0.2.0 or later.
Use escapeNonLatin1: true to force escape of all non-Latin-1 characters.
Run npm install --save-dev prettier-plugin-properties
Install the plugin or remove it from the plugins array.
Ensure the file has at least one key-value pair or comment.