New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: support biome for jest-snapshot formatting #15014
Comments
- includes `minimum` / `maximum` on the numeric ir model - uses these to add validations with `zod` - add `prettier` to fix bad inline-snapshot indentation (see jestjs/jest#15014) - memorize openapi validator in unit tests, speeding them up considerably (`~6s` -> `~1s` for the zod spec file)
- includes `minimum` / `maximum` on the numeric ir model - uses these to add validations with `zod` - add `prettier` to fix bad inline-snapshot indentation (see jestjs/jest#15014) - memorize openapi validator in unit tests, speeding them up considerably (`~6s` -> `~1s` for the zod spec file) - improve test harness for zod to support directly providing `IRModel` objects, and also execute the resulting schemas to parse a value - this makes it easier to write a broader range of tests, and should also prevent misunderstandings of the zod API Partially addresses #51
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 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. |
馃殌 Feature Proposal
Detect and use
biome
(https://biomejs.dev/) for the formatting/indentation of inline snapshots generated byjest-snapshot
Alternatively, throw an exception when:
prettier
package is installed/foundprettierPath
isundefined
(eg: not explicitly set tonull
)Motivation
I've recently migrated some projects from using
prettier
tobiome
for formatting, which in inadvertently broke the indentation of jest inline-snapshots.This wasn't immediately apparent/obvious, and it was only stumbling across #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 classbiome
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 onprettier
, 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
withbiome
, but the snapshots were not altered yet)The text was updated successfully, but these errors were encountered: