Open FloEdelmann opened 1 month ago
I’d like to take on this issue and update the documentation to reflect the current differences with Prettier. I’ll review the current discrepancies and make the necessary adjustments. Please assign this issue to me.
Documentation URL
https://biomejs.dev/formatter/differences-with-prettier/
Description
Some documented differences with Prettier are no longer differences because Prettier's behavior changed in the meantime:
Prettier doesn’t unquote some object properties that are valid JavaScript identifiers
:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier has an inconsistent behavior for assignment in computed keys.
:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier adds a trailing comma to type parameters of arrow functions even when it is not required.
:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier has an inconsistent behavior for parenthesized non-null-asserted optional chains
:warning: Prettier throws an error now about the invalid syntax Code example in Prettier Playground | Code example in Biome Playground
Prettier formats invalid syntaxes – Duplicate modifiers on class properties
:warning: Prettier throws an error now about the invalid syntax Code example in Prettier Playground | Code example in Biome Playground
Prettier formats invalid syntaxes – Assignment to an optional chain
:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier formats invalid syntaxes – Incorrect modifier for the type parameters of an interface
:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier formats invalid syntaxes – Top-level return
:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier formats invalid syntaxes – Erroneous self-increment and self-decrement
:warning: Prettier throws an error now about the invalid syntax Code example in Prettier Playground | Code example in Biome Playground
Prettier formats invalid syntaxes – Use of
abstract
modifier in non-abstract classes:heavy_check_mark: Still correct Code example in Prettier Playground | Code example in Biome Playground
Prettier has inconsistencies between TypeScript and Babel parsing
:warning: Prettier formats the code consistently now with the
babel
/babel-ts
/typescript
parsers Code example in Prettier Playground | Code example in Biome PlaygroundExpectations
For all differences with a :heavy_check_mark::
For all differences with a :warning::
Code of Conduct