Replies: 16 comments 55 replies
-
Architecture
|
Beta Was this translation helpful? Give feedback.
-
Line Wrapping and printWidthSee https://antfu.me/posts/why-not-prettier
The most frequently criticized feature is Prettier's automatic wrapping and unwrapping of lines based on its printWidth setting (typically 80 or 100 characters). While intended to prevent horizontal scrolling, this behavior often creates significant "noise" in Git diffs. A minor change to a long string or function signature can cause an entire block of code to be reformatted, obscuring the actual logic change and making code reviews more difficult and time-consuming. In certain contexts, such as functional programming pipelines or long, chained method calls, the resulting formatting can be objectively harder to read than the original, manually formatted code. The inability to disable this behavior is a major and long-standing complaint. |
Beta Was this translation helpful? Give feedback.
-
Builtin sorting and aesthetically features
|
Beta Was this translation helpful? Give feedback.
-
DefaultsDefaults will be aligned to prettier for compatibility reasons. |
Beta Was this translation helpful? Give feedback.
-
Why not dprintDprint has two parts:
We want to offer a better formatter. We can offer a dprint wasm plugin for existing users of dprint. |
Beta Was this translation helpful? Give feedback.
-
Built-in tailwindcss support? |
Beta Was this translation helpful? Give feedback.
-
Config support
|
Beta Was this translation helpful? Give feedback.
-
|
Proper html formatting would be a huge deal for many users. Currently prettier enforces jsx style for html. <!-- prettier -->
<img src="" />
<!-- proper html -->
<img src=""> |
Beta Was this translation helpful? Give feedback.
-
|
I would like to completely abandon eslint in favor of oxlint, but I can't do that without using third-party eslint plugins. This is because no formatter (at the moment) can provide the flexibility and accuracy that https://eslint.style offers. If oxfmt becomes its counterpart, then it has a future. Otherwise, it will just be another unnecessary (or even harmful) formatter like prettier and biome. |
Beta Was this translation helpful? Give feedback.
-
Style/Script indentationWould've been important to have CSS, JS, HTML have indentation within them: <html>
<body>
</body>
</html>.text-blue {
color: blue;
}function a() {
return;
}But not having indentation on their edge is absolute nonsense: <head>
<style lang="text/css">
.text-blue {
color: blue;
}
</style>
</head>should be <head>
<style lang="text/css">
.text-blue {
color: blue;
}
</style>
</head> |
Beta Was this translation helpful? Give feedback.
-
|
I was starting a new project and was about to go with prettier along with Things are coming together and that is making big difference on our end. Thanks team. |
Beta Was this translation helpful? Give feedback.
-
|
I would love it if we could configure how ternaries are formatted https://x.com/pcattori/status/1734712411700023443 |
Beta Was this translation helpful? Give feedback.
-
|
Can you please add an option to not indent switch cases? Like this: switch (foo) {
case 1:
// case 2
case 2:
// case 2
}Prettier adds indentation before each case, and there is no option to change it. |
Beta Was this translation helpful? Give feedback.
-
|
Building off of preserving existing line breaks instead of enforcing a max print width – an option to enforce one level of indent for any expression already spanning more than one line (and parentheses if not otherwise fully contained within braces/brackets/backticks). const sum = (
variable1
+ superLongVariable2 * superLongVariable3 / superLongVariable4
- variable5
)const result = (
condition1 ?
value1
: condition2 ?
value2
:
value3
)const nodes = [
tree
.getRootNode()
]console.log(
'The value will be',
(
variable1 && variable2 && (
variable3?.method?.()
?? variable4
)
),
`at time ${
Date.now()
+ 24 * 60 * 60 * 1000
+ 10 * 60 * 1000
}`
)const visibleItems = (
[
{
x: 1,
y: 2,
},
{
x: -3,
y: -4,
},
{
x: (
left + (
element
?.getBoundingClientRect()
.width
?? 0
)
),
y: 10,
),
]
.filter(({ x, y }) => (
x > 0
&& y > 0
))
)TypeScript types too: type Color = (
| 'RED'
| 'GREEN'
| 'BLUE'
)type Options = (
| false
| {
foo: string
bar: number
}
| (
& {
hello: string
world: number
}
& MoreProps
& EvenMoreProps
)
) |
Beta Was this translation helpful? Give feedback.
-
|
What's the status on Vue/Svelte support? I couldn't find any info on this, will this be part of 1.0? |
Beta Was this translation helpful? Give feedback.
-
|
Currently running |
Beta Was this translation helpful? Give feedback.


Uh oh!
There was an error while loading. Please reload this page.
-
This discussion documents our decision process for our up coming formatter called oxfmt.
Prioritizations are performance and better DX.
Using structured comments below for better discussion.
Beta Was this translation helpful? Give feedback.
All reactions