Skip to content
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

CLI: Fix storiesof-to-csf codemod for TypeScript #12453

Merged
merged 3 commits into from Sep 12, 2020

Conversation

remorses
Copy link
Contributor

Issue: #9669

What I did

  • fix prettier parser to use the correct parser name
  • use StringLiteral ast name instead of Literal when using typescript
  • use project prettier config to format

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @remorses, thanks so much for fixing this! 😍

The change seems to be messing up the snapshot tests. I dug in for a minute but wasn't obvious to me why... do you have any ideas?

@shilman shilman modified the milestones: 6.1 maintenance, 6.0.x Sep 11, 2020
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Sep 11, 2020
@ndelangen
Copy link
Member

Seems like all changes are just quotes..

Is there some prettier config we need to pass in?

@shilman
Copy link
Member

shilman commented Sep 11, 2020

I put some logging in earlier and the project prettier config which is supposed to be respected (awesome!) seems to have single quotes, but the output has double quotes.

@remorses
Copy link
Contributor Author

Fixed, now it is using the correct prettier config

@shilman shilman changed the title Fix typescript codemod storiesof to csf CLI: Fix storiesof-to-csf codemod for TypeScript Sep 12, 2020
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙌

@shilman shilman merged commit cefec18 into storybookjs:next Sep 12, 2020
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Sep 26, 2020
shilman added a commit that referenced this pull request Sep 26, 2020
CLI: Fix storiesof-to-csf codemod for TypeScript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants