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

Match suffixes of multisuffix files #9

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

jsoref
Copy link
Contributor

@jsoref jsoref commented Apr 24, 2024

@Anu48 reported that build-actions/prettier wouldn't match file.cy.js based on *.js being a supported prettier extension. I believe this should resolve that problem.

The old code would treat .cy.js as the file extension and only match things explicitly based on that. The new code lets each supported extension match against the entire file name and if it hits, selects that directory as an included directory.

As prettier can support an .js.flow the original code wouldn't support this case if you had a file name something.else.js.flow, so we definitely want to change the handling to allow for that.

@jsoref jsoref requested review from lzm0 and Anu48 April 24, 2024 21:30
Copy link
Contributor

@Anu48 Anu48 left a comment

Choose a reason for hiding this comment

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

From first glance, it looks good to me. The following workflow in lighthouse-e2e-resources utilizes this update and prettier fails as expected: https://github.com/GarnerCorp/lighthouse-e2e-resources/actions/runs/8824165005

@jsoref jsoref force-pushed the treat-extensions-more-generously branch from 50a334a to 81b8469 Compare April 25, 2024 16:00
@jsoref jsoref merged commit 4d89b33 into main Apr 25, 2024
7 checks passed
@jsoref jsoref deleted the treat-extensions-more-generously branch April 25, 2024 16:24
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.

None yet

3 participants