prettier-plugin-zh

prettier-plugin-zh

prettier-plugin-zh is a Prettier plugin of Zh.

only support .md now.

Installation

You can install prettier-plugin-zh using npm, yarn or pnpm:

npm i -D prettier prettier-plugin-zh

Usage

  1. Create a prettier config file (opens in a new tab) in the root of your project.
  2. Add the following configuration to enable the plugin:
{
  "plugins": ["prettier-plugin-zh"]
}

Configuration

Here is a example:

{
  "plugins": ["prettier-plugin-zh"],
  "spaceAroundAlphabet": true,
  "spaceAroundNumber": true,
  "noSpaceBetweenNumberUnit": ["%", "°C", "°"]
}

Acknowledgements

We would like to express our gratitude to the Prettier team for their amazing work in developing such a powerful code formatting tool.

Thank you for using prettier-plugin-zh! If you have any questions or encounter any problems, please don't hesitate to reach out to us through the issue tracker on GitHub. Happy formatting!