https://github.com/eemeli/prettier-plugin-properties
Prettier plugin for .properties files
https://github.com/eemeli/prettier-plugin-properties
Last synced: 3 months ago
JSON representation
Prettier plugin for .properties files
- Host: GitHub
- URL: https://github.com/eemeli/prettier-plugin-properties
- Owner: eemeli
- License: mit
- Created: 2020-04-08T23:11:52.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2026-02-28T06:51:24.000Z (4 months ago)
- Last Synced: 2026-03-15T05:30:07.115Z (3 months ago)
- Language: JavaScript
- Size: 323 KB
- Stars: 22
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Prettier for .properties Files
Adds support to Prettier (v2.3 and later) for [`.properties`](https://en.wikipedia.org/wiki/.properties) files.
To use, install it:
```
npm install --save-dev prettier-plugin-properties
```
and then add it to your [Prettier plugin configuration](https://prettier.io/docs/plugins).
## Configuration
In addition to the default options, two additional options are available:
### Escape Non-Latin-1 Characters
Escape with `\u` all non-Latin-1 characters, to allow safely encoding output as ISO-8859-1.
| Default | CLI Override | API Override |
| ------- | --------------------- | ------------------------- |
| `false` | `--escape-non-latin1` | `escapeNonLatin1: ` |
### Key Separator
Set the separator to use between a property key and its value.
Valid options:
`" " | ":" | "=" | ": " | "= " | " : " | " = "`
| Default | CLI Override | API Override |
| ------- | ------------------------- | ----------------------- |
| `" = "` | `--key-separator ""` | `keySeparator: ""` |
### Using Overrides
To apply separate Prettier configuration for different file types,
you may use [configuration overrides](https://prettier.io/docs/configuration.html#configuration-overrides).
For example:
```json
{
"overrides": [
{
"files": "*.properties",
"options": {
"printWidth": 0
}
}
]
}
```