Skip to content

About

A plugin for dprint to format cedar policy files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

dprint-plugin-cedar

npm version CI

Adapter for cedar-policy-formatter for use as a formatting plugin in dprint. It formats Cedar policy files (.cedar).

Install

Install and setup dprint.

Then in your project's directory with a dprint.json file, run:

dprint add cedar

Note: You do not need the Cedar CLI installed globally as dprint will run cedar-policy-formatter from the .wasm file in a sandboxed environment.

Configuration

To add configuration, specify a "cedar" key in your dprint.json:

{
  "cedar": {
    "lineWidth": 80,
    "indentWidth": 2,
  },
  "plugins": [
    // ...etc...
  ],
}

For an overview of the config, see https://dprint.dev/plugins/cedar/config/

JS Formatting API

Versioning

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A plugin for dprint to format cedar policy files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages