An formatter plugin for Prettier
Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing, taking various rules into account.
This plugin adds support for razor files (Blazor code).
This plugin is still under development, and has very basic formatting functionality. Please try it out and provide feedback. Note that the @code sections (pure C# code) are ignored by the formatter.
yarn:
yarn add --dev prettier prettier-plugin-razor --dev --exact
npm:
npm install prettier prettier-plugin-razor --save-dev --save-exact
This plugin will be loaded automatically (if installed) by prettier to format files ending with .razor suffix. Using it is exactly the same as using prettier
Prettier CLI usage docs
Prettier API usage docs
This library follows the same configuration format as Prettier, which is documented here. However, at this time, there are no configurations options enabled.