You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Applying sneak_case for a tag like "v1" it gets transformed into "v_1" .
It may be very subjective but in my opinion is ugly, and I would prefer that resulting output after applying sneak_case would be "v1".
As changing split_words is a breaking change (and may be arguable whether the number is part of the word or not) maybe one solution could be to make the behavior of split_words configurable via config file.
I've had a few variations of this discussion now. Unfortunately there's no clear cut "best" way to do snake casing with numbers as sometimes it's appropriate to use a separate "word" and sometimes it's not. There is one open PR which will be landing in the next breaking version (#413) which may make the behavior better for your case? But the goals at this point around casing are more about consistency than style, since style is so subjective.
Activity
dbanty commentedon May 21, 2021
I've had a few variations of this discussion now. Unfortunately there's no clear cut "best" way to do snake casing with numbers as sometimes it's appropriate to use a separate "word" and sometimes it's not. There is one open PR which will be landing in the next breaking version (#413) which may make the behavior better for your case? But the goals at this point around casing are more about consistency than style, since style is so subjective.
ramnes commentedon May 21, 2021
Yeah, #413 should keep both "V1" and "v1" as "v1" rather than "v_1".
tsotnikov commentedon May 21, 2021
Thanks, #413 (not splitting all lowercase strings) looks good enough for me.
fix(generator)!: Improved the consistency of snake_cased identifiers …
fix(generator)!: Improved the consistency of snake_cased identifiers …
fix(generator)!: Improved the consistency of snake_cased identifiers …