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

TypeScript and JavaScript code formatting plugin for dprint.

Results 217 dprint-plugin-typescript issues
Sort by recently updated
recently updated
newest added

Example code ``` const query = db. select(longParameter1). from(longParameter2). where(longParameter3). groupBy(longParameter4). orderBy(longParameter5). exec(); ``` With the default configuration, it always changes to the following ``` const foo = db .select(longParameter1)...

**Describe the bug** Deno version: 1.37.1 **Input Code** ```ts router.all( "/refresh", refreshJsMiddleware, ).all("/alive", aliveMiddleware); ``` **Expected Output** ```ts router .all("/refresh", refreshJsMiddleware) .all("/alive", aliveMiddleware); ``` **Actual Output** ```ts router.all( "/refresh", refreshJsMiddleware,...

enhancement

**Describe the bug** Deno version: 1.37.1 **Input Code** ```ts if ( k === -d || (k !== d && v[(k - 1) + max] < v[ (k + 1) +...

**Describe the bug** dprint-plugin-typescript version: 0.87.1 Using `spaceSurroundingProperties = false`. **Input Code** ```ts type Test = {[key in string]: string}; ``` **Expected Output** ```ts type Test = {[key in string]:...

[Playground link](https://dprint.dev/playground/#code/JYWwDg9gTgLgBAbwLACg7rjKBDAdgZwDNoQARAUwGMAbbHGYCAgGlQ0xwOKhAFEBhALIBBAMqUowMDEEQAJgFdq5VmgwAVTkRLkoq9przaeugGLZKMaAE99GLEe59RAVjvoHXEr1EAmAAwAjG5s9lpOPgGBAGzuHI7efkEA7HGexs5RABxp4YlRAJy5CTyR-gGqAL5whFAQIHAARAB0APQA+rjYIOT4YBa9rTD4jQDcqKhAA/language/typescript) Given: ```ts import { transformDeclarations, transformECMAScriptModule, Transformer, TransformerFactory, transformES5, transformES2015, transformES2016, transformES2017, transformES2018, transformES2019, transformES2020, } from "./_namespaces/ts"; ``` `eslint-plugin-simple-import-sort` sorts these like the above, which is to...

Type intersections break to be all hanging when an object type is involved: **Input Code** ```ts type Props = OtherProps & Readonly; type Foo = string & { foo: boolean...

Currently, `dprint` forces single-line JSX elements to remove enclosing parentheses, even when explicitly added by the developer. **Input Code** ```ts const Foo = ( ); function Bar({ baz }: BarProps)...

**Describe the bug** Deno version: x.x.x **Input Code** ```ts const a = 1, b = 2, c = 3 const result = a && (b && c) ``` **Expected Output**...

This is something I see in the TS repo and DT often: ```ts type Foo = | A | B | C ; type Bar = & A & B...

**Describe the bug** dprint-plugin-typescript version: 0.86.1 **Input Code** ```ts forEach(arr, f => a() && b() ); ``` **Expected Output** Maybe... ```ts forEach(arr, f => a() && b()); forEach( arr, f...

bug