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

**Describe the bug** dprint-plugin-typescript version: 0.83.0 Typescript 5.0 adds support for ECMAScript-standard decorators, which can appear in different places from the pre-standard `experimentalDecorators` after some last-minute changes. The cases below...

**Describe the bug** dprint-plugin-typescript version: 0.83.0 cargo: `cargo 1.67.0 (8ecd4f20a 2023-01-10)` platform: `Darwin Kernel Version 22.3.0` arch: `x86_64` **Expected behaviour** `cargo build` succeeds. **Problem** `cargo build` fails on latest `main`,...

**Describe the bug** dprint-plugin-typescript version: 0.83.0 **Input Code** ```ts a(() => { const b = c(d => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ).e; const f = ( z()} /> z()} /> ); }); ```...

- I don't know if such a feature is even needed for general public - I don't know if any of the code is good (first time editing Rust source)...

Hello, I'm looking for a rule which aligns all `=` or `:` on assignments, similar to golang fmt. Something like this would be positive: ```ts const foo = 12; const...

**Describe the bug** Dprint incorrectly erases whitespace around a single JSX expression inside single-line JSX elements. dprint-plugin-typescript version: 0.80.2 See [dprint playground](https://dprint.dev/playground/#code/DwPgUABBwCYJYDcQQN4CIAWBTANjg9mgL7QD08Sk0ADgE5bLrZ6EnCl0NjshA/language/typescript) vs [prettier playground](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEAeAfAHSgAh6gEwEsA3dHYTEACzgBs6IqBffAemLOz1QAcAnOOUo16jFuwFDsqNuhAAaEBF4wi0AM7JQAQ378IAdwAKehFpQ66hnQE8tSgEb8dYANZwYAZV6uiUAHNkGH4AVzglOABbRzgCAjiAGR1A0J0AuAAxCH4onRg1QOQQHVCYCEUaGCi6AHVqIngNXzA4L3NG0kbbYrANBxB-DTh+GGMXALzkADMrYaUAKw0ADwAhF3dPLx0ouET-OBm5iJAl5a9-ALo4AEVQiHgjunmQX35h-mKYW144DTB+ERVJUBP4YLUiAQYNRkAAOAAMSgEEGGtRcvGKUg+JEOSgAjvd4OMVBYShoALRQOBxOKVQQEoiCcbpKZIWbPE7DKJEYJhTmXa53B6HNnHJQwHSOCFQmFIABM4pcRDolwAwhAoqyQH8AKyVULDAAqkos7JeJHCAEkoAlYF4AUCYABBG1eb7XJ7DZjMIA) for the same code sample....

bug
priority: high

**Describe the bug** dprint-plugin-typescript version: 0.80.2 When `preferSingleLine` is enabled, dprint incorrectly collapses multi-line JSX, as there is no space in the rendered output of the original code (whitespace is...

bug

**Describe the bug** dprint-plugin-typescript version: 0.80.2 Not sure if this is a bug, but it is unexpected. formatting conditional types spread out over multiple lines puts the first part on...

I've noticed multi-lining currently is only done when the configured `lineWidth` is reached. However, we'd like to always multiline imports/objects that have more then 1 parameter, e.g.: Currently: ```ts import...

enhancement

Currently we have config options for "functionDeclaration.spaceBeforeParentheses", "functionExpression.spaceBeforeParentheses", etc. It would be good to have a similar "functionApplication.spaceBeforeParentheses". This is useful for [sanctuary style](https://sanctuary.js.org/#section:currying) curried functions. ```js S.reduce (S.add) (0)...