-
Notifications
You must be signed in to change notification settings - Fork 4
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure default naming convention for target files #161
base: main
Are you sure you want to change the base?
Configure default naming convention for target files #161
Conversation
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
Hi @Droxx Thanks for opening this pull request - you're officially the first contributor for the extension beside @dependabot and me 🥳 Can you provide some examples of the use-cases of this in the pull-request description, please? 🙂 |
Sure! Updated, thankyou |
Great, I like the updated description! Thanks. Can we add just a few examples of what a converted file name becomes, like this: Also, are you able to resolve the merge conflicts of the pull-request? |
Thanks for the feedback @hilleer. I've addressed most of it but I got interrupted! I'll finish it off and push a resolving commit (and resolved conflicts). Then I'll nudge you |
All done and ready for re-review @hilleer |
Great! Good job. I'll be going on an offsite with work. Will get back to a re-review asap! |
Hi @hilleer, just adding a polite reminder here for a re-review |
New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎
Footnotes |
…https://github.com/Droxx/vscode-yaml-plus-json into configure-default-naming-convention-for-target-files
Hi @Droxx Once again big thanks for your contribution! 🥳 While reviewing the code I couldn't stop thinking wether this feature actually belongs in this extension and the purpose of it 🤔 It somewhat feel like an edge case and something that might be part of a different- or its own extension. Leaving this here for a bit to see if other users of the extension or from the community will share their thoughts on this. |
Added the ability to configure a target naming convention. When this is set, converted files will have a naming convention applied to the target files.
Supported conventions include
PascalCase
camelCase
kebab-case
snake_case
I implemented this because I work with a team that are generating configuration files for our software. Some team members prefer to work in YAML, and some prefer to work in JSON. The software that consumes these configuration files is agnostic towards the file format. However, when files are in YAML format, it is not case insensitive.
When team members convert a file, (we have been using YAML<3JSON for some time!). The act of adjusting the naming convention from a case-insensitive JSON file, to a camelCase YAML file can be tedious.
This change can overcome that hurdle, and have all, newly-converted files, adhere to the a camelCase naming convention instantly upon conversion.
This could be useful for similar use cases elsewhere. I know for certain that the most widely used YAML deserializer package in .NET is case sensitive, whereas the JSON serializers all have an option to ignore case. So any developers out there with equally agnostic software could benefit from this change.