Skip to content

Conversation

@SunsetFi
Copy link

@SunsetFi SunsetFi commented Mar 17, 2025

prettier-quick looks at git for what files have changed, but lint-staged is already running in a loose file environment. However, lint-staged passes a list of all changed files as command arguments.

As such, lint-staged should run prettier directly, as it will receive the list of changed files and restrict what it formats.

@SunsetFi SunsetFi mentioned this pull request Mar 17, 2025
@gioboa
Copy link
Collaborator

gioboa commented Mar 17, 2025

Thanks @SunsetFi
In this PR there are few changes and these are not related to prettier.
Can you fix up the PR please? I will be more than happy to merge this improvement. Thanks

@gioboa gioboa changed the base branch from main to monorepo March 17, 2025 23:32
@gioboa gioboa changed the base branch from monorepo to main March 17, 2025 23:33
@SunsetFi SunsetFi changed the base branch from main to monorepo March 18, 2025 15:26
@SunsetFi
Copy link
Author

Sorry about that, I got some things tangled up when fixing this.

This fix should target the monorepo branch, as that's where lint-staged was introduced.

Copy link
Collaborator

@gioboa gioboa left a comment

Choose a reason for hiding this comment

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

That's great @SunsetFi 👏

@gioboa gioboa changed the title chore: Fix prettier fix: use prettier directly in lint-staged Mar 18, 2025
@gioboa gioboa merged commit e5452c7 into module-federation:monorepo Mar 18, 2025
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.

2 participants