Should zod schema names start with an uppercase letter or not?
What is the general guideline for naming zod schemas. In the docs there seem to be examples using capitalized names as well as lowercase names, thus I was wondering what naming convention the community decided upon.
This example uses lowecase
userSchema
:
Whereas this one uses uppercase User
:
12 Replies
there is no rule about it
just do what looks right for you
Like @nyx (Rustular DevRel) said, just do what you want but keep consistent... If you choose upper keep it don't miss with lower
Doesn't matter
I just stick to the usual consensus around objects but am very tempted to start prefixing them with z like "zUser" to better highlight they are kinda different
sorta like type names being TUser
not a thing anymore
we don' do that
nyx has shilled it to me
I STOPPED DOING IT THEN NYX CONVINCED ME AGAIN AND NOW ITS OUT OF FASHION
ðŸ˜
nyx bozo
aint no body call a counter variable an intCounter either
eh ugly emoji
BETTER
who is a
ok pleb
Look at them with their white name