storyblok-cli
storyblok-cli copied to clipboard
fix: generate typescript types using camel case
Pull request type
Jira Link: INT-
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Other (please describe):
How to test this PR
In order to test these changes, just generate types using storyblok generate-typescript-typedefs
with the --typeNamesPrefix Prefix
flag. You will see that the types are now generated without violating Typescript's type naming convention when using --typeNamesPrefix
flag. The issue was the usage of lodash.camelCase
.
What is the new behavior?
- Without these changes, the generated output for a component named
component_name
would bePrefixcomponentNameStoryblok
which is clearly violating Typescript's type naming convention. - With these changes the types are named matching the Typescript type naming convention like
PrefixComponentNameStoryblok
.
Other information
We are using the --typeNamesPrefix
flag to match our typing schema. Therefore, we would be really thankful to get this changes in.