-
Notifications
You must be signed in to change notification settings - Fork 56
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
Use string literal names rule #117
base: main
Are you sure you want to change the base?
Use string literal names rule #117
Conversation
This is fantastic @Dschungelabenteuer ! I made a few tweaks and added a few more test cases which we need to support. Can you take a look? |
@yannbf It looks good to me, |
…ed support for missing cases
Sorry for being that long to address these cases @yannbf, I've been a bit busy lately! While taking a look at some other issues (including #28 and #67 you mentioned on Discord), I ended up being a bit more ambitious than just addressing the original issue and its test cases. I definitely wanted to have a generic, easy and re-usable way of restricting validation logic to stories and their properties. I came up with some wrapper function which abstracts the whole process of "figuring out whether we're in a Story context" and exposes a very simple API to get stories and story properties. You can even filter them, which can come handy as illustrated by the
I believe this could make writing new rules much easier, and bring in a bit of confidence about what's going on under the hood. The rule I've wrote to address the original issue now just holds in <50 LOC! However, I could not come up with any good approach on how to unit test the wrapper, which kind of upsets me! I'd love to get your insight! |
Issue: #111
What Changed
Documentation and any plain english content may need to be rephrased.
Checklist
Check the ones applicable to your change:
yarn update-all
Change Type
Indicate the type of change your pull request is:
maintenance
documentation
patch
minor
major