-
Notifications
You must be signed in to change notification settings - Fork 126
Add theme-utils #358
Add theme-utils #358
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Thanks for working on this, Alex. We already have a PR for escaping the patterns here. Maybe we should go with this one given that it also has the validate theme functionality. |
Preview changesYou can preview these changes by following the link below: I will update this comment with the latest preview links as you push more changes to this PR. |
Sorry @juanfra I didn't see that you already had that one open 😅 Would you be willing to give this one a test to make sure things are working as expected with my modifications? |
No problem @ajlende! Thank you for working on this.
I've tested this one, and it is not working for me. Screen.Recording.2024-09-19.at.11.24.37.mov |
|
@juanfra Thanks for testing! That issue should be fixed now. Give it another try. |
juanfra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ajlende - works like a charm 🏅
Description
Closes #4
Copied from Automattic/themes since there are some recent changes that haven't made it into WordPress/community-themes yet. I had to make some modifications so that it can work on single-theme repos.
This does not include the modifications that
escape-patternswould make to files or GitHub Automations to run validation on PRs.Difference from WordPress/community-themes:
lint:theme: Instead ofpatterns:escapein community-themeslint:patterns:fix: Instead ofschema:validatein community-themesescape-patternsruns on all patterns instead of only modified files. (Seenode theme-utils.mjs help escape-patternsfor instructions to run on only modified files.)Testing Instructions
Don't forget to
npm installas there are some new dev dependencies.Run both commands
npm run lint:themenpm run lint:patterns:fixVerify issues/changes reported are correct.