Install
Then in your project's dprint configuration file:
- Specify the plugin url in the
"plugins"
array. - Ensure
.ts
,.tsx
,.js
,.jsx
,.mjs
,.cjs
file extensions are matched in an"includes"
pattern. - Add a
"typescript"
configuration property if desired.{ // ...etc... "typescript": { // TypeScript & JavaScript config goes here }, "includes": [ "**/*.{ts,tsx,js,jsx,mjs,cjs}" ], "excludes": [ "**/node_modules" ], "plugins": [ "https://plugins.dprint.dev/typescript-0.84.0.wasm" ] }
JS Formatting API
- JS Formatter - Browser/Deno and Node
- npm package