devongovett / dprint-node

A node API for the dprint TypeScript and JavaScript code formatter
MIT License
483 stars 11 forks source link

Ship with json plugin #132

Open stephenh opened 2 years ago

stephenh commented 2 years ago

Assuming it's not a huge deal, JSON is common in JS/TS projects, could dprint-node ship with it available as well?

I tried passing plugins, based on the dprint docs, but looks like that doesn't work:

  const content = dprint.format("config.json", config, {
    plugins: ["https://plugins.dprint.dev/json-0.15.5.wasm"],
  });

As I got an InvalidArg.