Skip to content

feat: opt out of prettier - #1453

Merged
Andarist merged 11 commits into
changesets:mainfrom
bennypowers:feat/prettier-opt-out
Feb 17, 2025
Merged

Andarist merged 11 commits into
changesets:mainfrom
bennypowers:feat/prettier-opt-out

Conversation

@bennypowers

@bennypowers bennypowers commented Sep 4, 2024 •

Copy link
Copy Markdown
Contributor

Fixes #1452

What I did

  • add a config flag: formatChangesetsWithPrettier (default: true) add a config flag prettier (default: true)
  • add a cli flag: --noFormatChangesetsWithPrettier
  • optionally pass the config to writeChangesets from the cli

## Notes to reviewers

See changesets/action#397

@changeset-bot

changeset-bot Bot commented Sep 4, 2024 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 985085f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 15 packages
Name Type
@changesets/types Minor
@changesets/config Minor
@changesets/cli Minor
@changesets/write Minor
@changesets/apply-release-plan Patch
@changesets/assemble-release-plan Patch
@changesets/changelog-git Patch
@changesets/changelog-github Patch
@changesets/get-dependents-graph Patch
@changesets/get-release-plan Patch
@changesets/parse Patch
@changesets/pre Patch
@changesets/read Patch
@changesets/release-utils Patch
@changesets/should-skip-package Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codecov

codecov Bot commented Sep 4, 2024 •

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.94%. Comparing base (68a83d5) to head (985085f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/apply-release-plan/src/index.ts 50.00% 1 Missing and 1 partial ⚠️
packages/config/src/index.ts 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1453      +/-   ##
==========================================
- Coverage   81.00%   80.94%   -0.06%     
==========================================
  Files          54       54              
  Lines        2232     2241       +9     
  Branches      659      674      +15     
==========================================
+ Hits         1808     1814       +6     
- Misses        420      422       +2     
- Partials        4        5       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

bennypowers added a commit to bennypowers/changesets-action that referenced this pull request Sep 4, 2024
Comment thread .changeset/thick-countries-kiss.md Resolved
Comment thread .changeset/thick-countries-kiss.md Resolved
@Andarist
Andarist merged commit 84a4a1b into changesets:main Feb 17, 2025
@github-actions github-actions Bot mentioned this pull request Feb 17, 2025
@bennypowers
bennypowers deleted the feat/prettier-opt-out branch February 17, 2025 12:42
@bennypowers

Copy link
Copy Markdown
Contributor Author

Thank you, @Andarist :D

}
}

if (json.prettier !== undefined) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@Andarist @bennypowers should this check also include boolean since that is a valid value as well?

@freddielaycock freddielaycock Feb 18, 2025 •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Currently getting
error The `prettier` option is set as false when the only valid values are undefined or a boolean
when setting the config option as false as a result of the above

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think this should fix it #1590

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.

Please don't run prettier on our changelogs

4 participants