[Feature]: support biome for jest-snapshot formatting
🚀 Feature Proposal
Detect and use biome (https://biomejs.dev/) for the formatting/indentation of inline snapshots generated by jest-snapshot
Alternatively, throw an exception when:
- No
prettierpackage is installed/found - And,
prettierPathisundefined(eg: not explicitly set tonull)
Motivation
I've recently migrated some projects from using prettier to biome for formatting, which in inadvertently broke the indentation of jest inline-snapshots.
This wasn't immediately apparent/obvious, and it was only stumbling across https://github.com/jestjs/jest/issues/14305 that made me realize that removing prettier as a dependency had caused this.
Example
No response
Pitch
I appreciate from looking at the PR implementing support for prettier@3 that introducing first class biome support might be more complexity / core bloat than it's worth (though I do think it would be nice).
The alternative of throwing an error though would've saved me a lot of confusion / frustration - I had no idea that jest-snapshot relied on prettier, and since the snapshot indentation changes only happened when snapshots needed updating, there was a gap between the break being introduced and being visible.
(ie: https://github.com/mnahkies/openapi-code-generator/pull/129/files#diff-64237f590faccbee856b106612fd72c8d370d7bd5aafc38c489f62b692344617 replaced prettier with biome, but the snapshots were not altered yet)
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
Not stale
Yeah, I don't have any interest in supporting Biome out of the box (unless it's trivial - happy to take a PR in that case).
Why can you not set it to null?
EDIT: I guess you might not know you need to - I don't think the loss of auto indented snapshots for prettier users are worth supporting the waaay lower user base of biome. Happy to take ideas in how to improve the experience.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.