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

fix(codemods): Codemods create extra parentheses #1727

Draft
wants to merge 1 commit into
base: integration/BC-v3-design-tokens
Choose a base branch
from

Conversation

pavelklibani
Copy link
Contributor

@pavelklibani pavelklibani commented Oct 23, 2024

Description

Sometimges codemods are adding extra parentheses around component and it should not.

There is a bug in recast library used by jscodeshift(codemod library) casing this behaviour.

Additional context

It will happen when there is return statement in the component.

More info can be found here:
facebook/jscodeshift#534
benjamn/recast#1406

Issue reference

Codemods are adding extra parentheses

@github-actions github-actions bot added the bug Something isn't working label Oct 23, 2024
Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for spirit-design-system ready!

Name Link
🔨 Latest commit 77f43f0
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system/deploys/67194db4336bd400085115c8
😎 Deploy Preview https://deploy-preview-1727--spirit-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 96 (no change from production)
Accessibility: 91 (🔴 down 2 from production)
Best Practices: 100 (no change from production)
SEO: 91 (🟢 up 1 from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 23, 2024

Deploy Preview for spirit-design-system-storybook ready!

Name Link
🔨 Latest commit 77f43f0
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-storybook/deploys/67194db49ba19e0008cd46dd
😎 Deploy Preview https://deploy-preview-1727--spirit-design-system-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

- codemods were adding extra parentheses to the
code when there was return statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant