Add lint rule for non-module stylesheet imports#77984
Conversation
|
Size Change: +166 B (0%) Total Size: 7.95 MB 📦 View Changed
ℹ️ View Unchanged
|
|
Flaky tests detected in e72da23. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/25434276874
|
|
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. |
ciampo
left a comment
There was a problem hiding this comment.
Great fix! LGTM 🚀
so are bulk suppressed time for the time being.
Thank you for writing your PR descriptions by hand 😄
What?
Part of #76744
Adds an ESLint rule to prevent new non-module stylesheet imports in JavaScript files.
Why?
Non-module stylesheet imports in JavaScript are easy to miss because they work at runtime, but they bypass the normal stylesheet pipeline. That can duplicate styles, omit styles from the enqueued stylesheet bundle, and skip build-time processing such as RTL generation.
How?
@wordpress/no-non-module-stylesheet-importswith tests and documentation.routes, with bulk suppressions for existing route/package cases that need separate migration.Testing Instructions
The stylesheet imports removed in this PR should be included in their respective stylesheet entry points. Other violations are less straightforward, so are bulk suppressed time for the time being.