WordPress / plugin-check

A repository for the new Plugin Check plugin from the WordPress Performance and Plugins Team.
https://wordpress.org/plugins/plugin-check/
GNU General Public License v2.0
198 stars 39 forks source link

Implement `Enqueued_Scripts_Scope_Check` #485

Closed swissspidy closed 4 days ago

swissspidy commented 4 days ago

Note: this is basically an exact copy of Enqueued_Styles_Scope_Check right now. And the other script/style-related checks are very similar too.

I suggest creating some abstraction in a new, separate PR to remove repeated code.

Fixes #23

swissspidy commented 4 days ago

@westonruter Just noting that I agree with the suggestions, but since they would need to be done in Enqueued_Styles_Scope_Check too, might be best to do that in a follow-up PR converging the two classes.

github-actions[bot] commented 4 days ago

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: swissspidy <swissspidy@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: mehulkaklotar <mehulkaklotar@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.