Skip to content

Conversation

@brandonpayton
Copy link
Member

Motivation for the change, related issues

We've encountered issues like #2026 where an undesired dependency on @wp-playground/wordpress-builds (which is an unpublished, private package) caused problems.

Implementation details

This PR adds an ESLint rule that considers dependency on @wp-playground/wordpress-builds to be an error. If a module wants a dependency on that package, it can disable the ESLint rule for the import line.

We should improve the rule message to better communicate the above.

Please feel free to take this and finish if you are interested. Otherwise, I can wrap later.

Testing Instructions (or ideally a Blueprint)

  • Add an ESLint rule tester test for this and ensure it is run as part of CI
  • CI

@brandonpayton
Copy link
Member Author

brandonpayton commented Dec 3, 2024

Lint is failing in CI because the rule is working and we still need to make some exceptions.

We need to disable the rule for intended users of wordpress-builds like the remote package. Example error here:
https://github.com/WordPress/wordpress-playground/actions/runs/12146203002/job/33869569177?pr=2048#step:4:218

We also need to disable the rule for tests. Example errors here:
https://github.com/WordPress/wordpress-playground/actions/runs/12146203002/job/33869569177?pr=2048#step:4:188

@adamziel
Copy link
Collaborator

adamziel commented Dec 4, 2024

Agreed about the exceptions, other than that it looks good 👍

@adamziel
Copy link
Collaborator

Poke for after the support rotation @brandonpayton

@adamziel adamziel merged commit eb876ab into trunk Dec 17, 2024
10 checks passed
@adamziel adamziel deleted the discourage-dependency-on-wordpress-builds branch December 17, 2024 08:59
@adamziel
Copy link
Collaborator

Yay, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants