Prettier Plugin

Wrapper plugin that formats many languages via Prettier.

This is a process plugin. Using this will cause the CLI to download, run, and communicate with a separate process that is not sandboxed (unlike WASM plugins).

Install and Setup

In .dprintrc.json:

  1. Specify the plugin url in the "plugins" array (follow instructions at https://github.com/dprint/dprint-plugin-prettier/releases/).
  2. Ensure the file extensions supported by prettier are matched in an "includes" pattern.
  3. Add a "prettier" configuration property if desired.
{
  // ...etc...
  "prettier": {
    "trailingComma": "all",
    "singleQuote": true,
    "proseWrap": "always"
  }
}

Configuration

See Prettier's configuration here. Specify using the "API Override" column.