113 mentions some issues that were not addressed, especially these todo notes. I've made changes so that it actually follows @typescript-eslint/parser's output AST. All literals are gathered in a Literal union type, which requires some type narrowing. According to docs and @storybook/csf types, descriptors should only support arrays of strings and single regexes, I've updated code accordingly.
While browsing the code, I've came across some code duplication, and some code that could benefit from further splitting (to make tests easier, and maybe improve readability (not that much confident about that huh). I took the liberty of refactoring a bit what appeared relevant (at least to me). Please let me know if you think I got carried away 😅
Checklist
Check the ones applicable to your change:
[X] Ran yarn update-all
[ ] Tests are updated <- Didn't need to, but ran them to make sure everything's still okay!
What Changed
113 mentions some issues that were not addressed, especially these todo notes. I've made changes so that it actually follows
@typescript-eslint/parser
's output AST. All literals are gathered in aLiteral
union type, which requires some type narrowing. According to docs and@storybook/csf
types, descriptors should only support arrays of strings and single regexes, I've updated code accordingly.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