Wrapper around prettier in order to use it as a dprint plugin.
- Install dprint
- Follow instructions at https://github.com/dprint/dprint-plugin-prettier/releases/
See Prettier's configuration here. Specify using the "API Override" column.
{
// ...etc...
"prettier": {
"trailingComma": "all",
"singleQuote": true,
"proseWrap": "always",
// enable prettier-plugin-jsdoc
"plugin.jsDoc": true
}
}
Add the file extension to the start of the configuration option. For example:
{
// ...etc...
"prettier": {
"singleQuote": true,
// use double quotes in js files
"js.singleQuote": false,
// use double quotes in ts files
"ts.singleQuote": false
}
}
- prettier-plugin-svelte
- Enabled by default.
- prettier-plugin-jsdoc
- Enable with
"plugin.jsDoc": true
configuration
- Enable with
Temporarily removed, but will be added back soon:
See issue #55 for the new plugin system.
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.