Skip to content

aminya/dprint-plugin-prettier

This branch is 6 commits ahead of, 98 commits behind dprint/dprint-plugin-prettier:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

46c6ff0 · Jul 21, 2022

History

65 Commits
Jul 20, 2022
Mar 26, 2022
Jul 21, 2022
Jul 1, 2022
Jul 20, 2022
Jul 20, 2022
Mar 26, 2022
Jul 20, 2022
Jul 1, 2022
Jul 2, 2022
Jul 2, 2022
Jan 23, 2022
Jul 20, 2022
Jul 21, 2022
Jul 20, 2022
Jul 1, 2022
Jul 1, 2022

Repository files navigation

dprint-plugin-prettier

CI

Wrapper around prettier in order to use it as a dprint plugin.

Install

  1. Install dprint
  2. Follow instructions at https://github.com/dprint/dprint-plugin-prettier/releases/

Configuration

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
  }
}

File extension specific configuration

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
  }
}

Included Prettier Plugins

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.

About

Prettier wrapper plugin for dprint.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Rust 77.3%
  • TypeScript 18.4%
  • PowerShell 2.6%
  • JavaScript 1.7%