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: apply prettier programmatically in update script #1656

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

dcroote
Copy link
Contributor

@dcroote dcroote commented Feb 22, 2023

Closes #1638. The fix is as @Siegrift suggested- to use prettier programmatically. It looked familiar because I ran into the same error in a slightly different context (though still generating config files) in #1488:

const formattedConfig = format(JSON.stringify(config, null, 2), { parser: 'json', printWidth: 120 });

I confirmed this solves the issue by running the script prior to the fix, seeing that multiple config files had formatting changes, then after this fix and noting that no files changed.

@dcroote dcroote self-assigned this Feb 22, 2023
Copy link
Contributor

@amarthadan amarthadan left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update-config-fixtures.ts script formats output differently than Prettier
2 participants