-
Notifications
You must be signed in to change notification settings - Fork 93
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 config for plugins #1264
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. |
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.
Thank you!
The milestone check seems to be stuck, as I did add a milestone. I'll merge anyway. I don't think we should use the |
const pluginFiles = micromatch( | ||
files, | ||
`**/${ PLUGIN_BASE_NAME }/plugins/${ plugin }/**`, | ||
{ dot: true } | ||
); | ||
|
||
if ( pluginFiles.length ) { | ||
commands.push( | ||
`composer lint:${ plugin } ${ joinFiles( pluginFiles ) }` | ||
); | ||
} |
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.
I just realized that this should technically also include **/${ PLUGIN_BASE_NAME }/tests/plugins/${ plugin }/*
at least until #1262 is merged (although hopefully that will be done momentarily and this won't be needed).
|
||
const otherFiles = micromatch( | ||
files, | ||
`!**/${ PLUGIN_BASE_NAME }/plugins/**`, |
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.
Ditto, if the above is done, then this would also omit !**/${ PLUGIN_BASE_NAME }/tests/plugins/**
Summary
See #1089
Relevant technical choices
package.json
tolint-staged.config.js
.