dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
TypeScript and JavaScript code formatting plugin for dprint.
**Describe the bug** Config: `"trailingCommas": "always",` dprint-plugin-typescript version: 0.93.3 **Input Code** ```ts const test = ["a","b","c"].map(value => value == "a quite long paragraph with many words") ``` **Expected Output** ```ts...
Having imports at the top of the file is a common convention, and makes it easier to analyze the dependency structure at a glance. Scrolling to the top of the...
I'd like the ability to specify a plugin to be used within a template literal string or tagged template expression. For instance: ```ts // dprint-template:dprint-plugin-typescript const result = myTaggedTemplateFn` #...
When writing long comments in TypeScript, I often find myself moving around the last few words of each line to get it as close to the desired width as possible....
Logical operators show coupling behavior when using `&&` in a multi-line if statement. For instance: ```ts if ( true || true && true ) { // ... } ``` This...
So this is a bit of a nitpick, but I strongly prefer ternary expressions that look like `cond? result1 : result2` instead of `cond ? result1 : result2`. Looking at...
When relying on ASI in JavaScript, there are some pitfalls you need to be aware of. To avoid these, there is an ESLint rule called [no-unexpected-multiline](https://eslint.org/docs/latest/rules/). In the linked documentation...
Seems like that commented code (or suppression) is removed by dprint when before the parameter comma. Even if my example could be written better, I wouldn't expect that dprint drops...
Hello, I started using dprint and I noticed a strange behaviour when descructuring objects. dprint-plugin-typescript version: 0.93.1 I leave you two examples: ``` const { activeTestLabelsTypeIds, setTestsBookPlanningFilter, testsBookPlanningFilter, setSelectedTestIds, isTestsBooksLoading...
**Describe the bug** If I leave a blank line between the last member of an object and a trailing comment, then dprint removes the line. It does not do this...