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(lint-staged): use negative pattern correctly #8842

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

caugner
Copy link
Contributor

@caugner caugner commented May 11, 2023

Summary

(MP-410)

Problem

YAML files were not automatically formatted with prettier as part of lint-staged, because the negative pattern for other files (introduced in 6184aff) is not correct. (Negative patterns must start with the !, not contain it.)

Solution

Fix the negative pattern.


Screenshots

Before

After


How did you test this change?

Tested by updating a YAML file to use single quotes ('), staging the changes, and running yarn lint-staged thereafter.

Negative patterns must start with the `!`, not contain it. This is
why YAML files were not formatted since 6184aff.
@caugner caugner requested a review from LeoMcA May 11, 2023 17:44
Copy link
Contributor Author

@caugner caugner left a comment

Choose a reason for hiding this comment

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

Self-approval.

@caugner caugner merged commit 8e74e5f into main May 11, 2023
@caugner caugner deleted the fix-lint-staged branch May 11, 2023 17:51
Copy link
Member

@LeoMcA LeoMcA left a comment

Choose a reason for hiding this comment

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

Oops! Thanks for fixing

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