dprint-plugin-typescript
dprint-plugin-typescript copied to clipboard
TypeScript and JavaScript code formatting plugin for dprint.
For example, if the opening tag name is less than a certain amount of characters, then the following should format as-is: ```tsx {content} ``` Instead of copying prettier and doing:...
Same as [import/newline-after-import](https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/newline-after-import.md). There are many rules in ESLint that would make more sense if they were handled by a format tool.
It would be nice to format html in tagged templates as Prettier does. For example: ```ts const t = html ` ${entry.mode} ${entry.size} ${entry.name} `; ``` Should format as: ```ts...
This is an attempt at implementing #379. Unfortunately there are still a few cases which don't work, but I wanted to check and see if I'm least working in the...
Changes this: ```ts @$.element() class Foo extends HTMLElement { @$.attr() color = 'blue' @$.attr() another = 123 @$.attr() withCapital = true button?: HTMLButtonElement result?: number = 123 ``` to this:...
See my upcoming comment in dprint/dprint#190. Right now this option is not consistent because there is not a space before the generator star so some other solution should be found...
This should keep the tag of the tagged template on the same line: https://dprint.dev/playground/#code/KYDwDg9gTgLgBAMwK4DsDGMCWEVwGIQQzBQAUAlHAN4CwAUHHFMDElLqfY4wDwAmmAG5duotABsAhgGdpAXiowA7gAMAtjAC0ARgBsicaDgArJNKwIAnprTAUxKHEzE10m3YcHQNiOLgAjaD4STRQcYACAc00YKEkUaTBJZns4YhAtfyk0AGsVAF8APhFeAHoBQWKGOHIAbnp8+iA/config/N4WAUABBBEAmCmA7A9tAXBALgJwK73AF9wg/language/typescript
I have a max width of `100` and wrote the following: ```ts export type EnsureKnownLookup = EnsureLookup; ``` Upon applying dprint, the line above becomes the following: ```ts export type...
There are a couple cases where I'd like dprint to behave a little bit more like prettier. The goals is that for assignments where the right-hand side is a binary...
Obviously template literals have advantages in terms of interpolation, escaping and newline handling, however we want to encourage use of template literals only for strings that are making use of...