Stokestack
Stokestack4w ago

How do you pass additional options to the code formatter, dprint?

Dprint is the formatter used by Deno, but the options listed for inclusion in deno.json are a tiny subset of those available in dprint. The doc here: https://docs.deno.com/runtime/fundamentals/linting_and_formatting/ says you can "specify custom rules" but never says how. Any insight appreciated!
Deno
Linting and formatting
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
2 Replies
bartlomieju
bartlomieju4w ago
You can see options here: https://docs.deno.com/runtime/reference/cli/formatter/#formatting-options (as flags) but you can also specify them in the config file
Deno
deno fmt, code formatting
In-depth documentation, guides, and reference materials for building secure, high-performance JavaScript and TypeScript applications with Deno
bartlomieju
bartlomieju4w ago
If you have Deno extension installed you will get autocomplete from the schema file: https://github.com/denoland/deno/blob/main/cli/schemas/config-file.v1.json
GitHub
deno/cli/schemas/config-file.v1.json at main · denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.