https://github.com/dprint/dprint-plugin-prettier
Prettier wrapper plugin for dprint.
https://github.com/dprint/dprint-plugin-prettier
Last synced: 5 months ago
JSON representation
Prettier wrapper plugin for dprint.
- Host: GitHub
- URL: https://github.com/dprint/dprint-plugin-prettier
- Owner: dprint
- License: other
- Created: 2020-06-19T17:21:07.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2026-02-27T02:10:33.000Z (5 months ago)
- Last Synced: 2026-02-27T09:38:27.698Z (5 months ago)
- Language: Rust
- Size: 2.56 MB
- Stars: 109
- Watchers: 2
- Forks: 12
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dprint-plugin-prettier
[](https://github.com/dprint/dprint-plugin-prettier/actions?query=workflow%3ACI)
Wrapper around [prettier](https://prettier.io/) in order to use it as a dprint plugin.
## Install
1. Install [dprint](https://dprint.dev/install/)
2. Follow instructions at https://github.com/dprint/dprint-plugin-prettier/releases/
## Configuration
See Prettier's configuration [here](https://prettier.io/docs/en/options.html). Specify using the "API Override" column.
```jsonc
{
// ...etc...
"prettier": {
"trailingComma": "all",
"singleQuote": true,
"proseWrap": "always",
// enable prettier-plugin-jsdoc
"plugin.jsDoc": true
}
}
```
### File extension specific configuration
Add the file extension to the start of the configuration option. For example:
```jsonc
{
// ...etc...
"prettier": {
"singleQuote": true,
// use double quotes in js files
"js.singleQuote": false,
// use double quotes in ts files
"ts.singleQuote": false
}
}
```
## Included Prettier Plugins
- [prettier-plugin-svelte](https://github.com/sveltejs/prettier-plugin-svelte)
- Enabled by default.
- [prettier-plugin-jsdoc](https://github.com/hosseinmd/prettier-plugin-jsdoc)
- Enable with `"plugin.jsDoc": true` configuration
Temporarily removed, but will be added back soon:
- [prettier-plugin-astro](https://github.com/withastro/prettier-plugin-astro)
See [issue #55](https://github.com/dprint/dprint-plugin-prettier/issues/55) for the new plugin system.
## Why Does This Exist?
The main reason this exists is to be able to use Prettier with dprint's CLI. That way, you can format with all the plugins that dprint supports, still use Prettier, and only have to run `dprint fmt`.
Additionally it's much faster. This plugin will format files in parallel and you can take advantage of the speed of dprint's incremental formatting if enabled.