Adapter for cedar-policy-formatter for use as a formatting plugin in dprint. It formats Cedar policy files (.cedar).
Then in your project's directory with a dprint.json file, run:
dprint add cedarNote: You do not need the Cedar CLI installed globally as dprint will run cedar-policy-formatter from the .wasm file in a sandboxed environment.
To add configuration, specify a "cedar" key in your dprint.json:
For an overview of the config, see https://dprint.dev/plugins/cedar/config/
- JS Formatter - Browser/Deno and Node
- npm package
This repo automatically upgrades to the latest version of cedar-policy-formatter once a day. You can check which version of cedar-policy-formatter is being used by looking at the cedar-policy-formatter entry in the Cargo.toml file in this repo:
https://github.com/dprint/dprint-plugin-cedar/blob/main/Cargo.toml
At the moment, the version of this plugin does not reflect the version of cedar-policy-formatter.
This project is licensed under the MIT License - see the LICENSE file for details.
{ "cedar": { "lineWidth": 80, "indentWidth": 2, }, "plugins": [ // ...etc... ], }