TypeScript / JavaScript
TypeScript/JavaScript code formatter.
Supports:
- TypeScript
- JavaScript - Supports all the JS syntax that the TS compiler supports.
- JSX/TSX
Install and Setup
In your project's directory with a dprint.json file, run:
dprint add typescript
This will update your config file to have an entry for the plugin. Then optionally specify a "typescript" property to add configuration:
{
// ...etc...
"typescript": {
// TypeScript & JavaScript config goes here
},
"plugins": [
// ...etc...
"npm:@dprint/typescript@0.100.0"
]
}
Ignoring Files
Add an ignore file comment as the first comment in the file:
// dprint-ignore-file
Ignore Comments
Add an ignore comment before the code:
// dprint-ignore
const identity = [
1, 0, 0,
0, 1, 0,
0, 0, 1,
];
// or even...
const identity = /* dprint-ignore */ [
1, 0, 0,
0, 1, 0,
0, 0, 1,
];
All plugins
Official Plugins
Community Plugins
Wrapper Plugins
Process
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Wasm
Process
Wasm
Wasm
Wasm
Wasm
Wasm