Conversation
🦋 Changeset detectedLatest commit: a61c1d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughAdds a new CSS lint rule Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@crates/biome_css_analyze/src/lint/nursery/no_deprecated_media_type.rs`:
- Around line 137-142: The test module can't see DEPRECATED_MEDIA_TYPES; bring
it into scope by adding a use statement inside mod tests (e.g., add use
super::DEPRECATED_MEDIA_TYPES; or uncomment use super::*;) so the
builtin_list_is_sorted test can reference DEPRECATED_MEDIA_TYPES, or
alternatively change the constant's visibility to pub(crate) if the test lives
in a different module.
- Around line 79-92: The current check uses
DEPRECATED_MEDIA_TYPES.binary_search(&media_type) which is case-sensitive, so
media types like "TV" are missed; normalize the media type to a consistent case
before checking (e.g., compute a lowercase form of the media_type string such as
media_type.to_ascii_lowercase() or otherwise compare using a case-insensitive
equality) and perform the membership check against DEPRECATED_MEDIA_TYPES using
that normalized value (or ensure DEPRECATED_MEDIA_TYPES is stored in the same
lowercase form) where the binary_search is done; update the code around the
media_type variable and the DEPRECATED_MEDIA_TYPES.binary_search call to use the
normalized media type.
Merging this PR will not alter performance
Comparing Footnotes
|
ae62355 to
7031822
Compare
7031822 to
1324957
Compare
1324957 to
a61c1d3
Compare
Summary
Port https://stylelint.io/user-guide/rules/media-type-no-deprecated/
First draft was generated by gpt-5.2-codex, but I ended up throwing out most of it.
Test Plan
snapshots
Docs