dprint-plugin-json icon indicating copy to clipboard operation
dprint-plugin-json copied to clipboard

Sort `package.json` properties

Open haltcase opened this issue 1 year ago • 0 comments

Given that Cargo.toml is supported by dprint-plugin-toml, I thought it would make sense to handle package.json similarly here. This would help me migrate more fully to dprint.

I have limited Rust experience, but would be willing to have a go at a PR for this feature (the TOML plugin should be a good reference).

Prior art

Alternatives

  1. If not acceptable as a feature of this plugin, write it as a separate one. I'd also be willing to give that a shot, but in that case would appreciate guidance (mostly around the Rust/dprint infra).
  2. Continue to use existing options
    • Use dprint-plugin-exec with sort-package-json CLI
    • Continue to use Prettier, use https://github.com/dprint/dprint-plugin-prettier/issues/55 when available

haltcase avatar Dec 13 '24 17:12 haltcase