Skip to content
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

feat(biome_css_analyzer): implement noUnknownMediaFeatureName #2751

Conversation

Kazuhiro-Mimaki
Copy link
Contributor

Close #2626

Summary

Implements media-feature-name-no-unknown

Test Plan

Add snapshots.

@github-actions github-actions bot added A-Project Area: project L-CSS Language: CSS A-Diagnostic Area: diagnostocis labels May 7, 2024
@Kazuhiro-Mimaki Kazuhiro-Mimaki changed the title Kazuhiro mimaki/media feature name no unknown feat(biome_css_analyzer): implement noUnknownMediaFeatureName May 7, 2024
Copy link

codspeed-hq bot commented May 7, 2024

CodSpeed Performance Report

Merging #2751 will not alter performance

Comparing Kazuhiro-Mimaki:Kazuhiro-Mimaki/media-feature-name-no-unknown (55de9c7) with main (4213527)

Summary

✅ 97 untouched benchmarks

@Kazuhiro-Mimaki Kazuhiro-Mimaki force-pushed the Kazuhiro-Mimaki/media-feature-name-no-unknown branch from e4a7b8d to 6722366 Compare May 7, 2024 06:59
Copy link
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the unwrap should be removed. You should use ? instead.

crates/biome_css_analyze/src/keywords.rs Outdated Show resolved Hide resolved
return Some(true);
}
let right = css_media_and_condition.right().ok().unwrap();
check_any_css_media_and_combinable_condition(right)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I strongly suggest avoiding recursions if possible. Usually you can use loops or iterators

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replaced recursions with loops.

crates/biome_css_analyze/src/utils.rs Outdated Show resolved Hide resolved
crates/biome_css_analyze/src/utils.rs Outdated Show resolved Hide resolved
crates/biome_css_analyze/src/utils.rs Outdated Show resolved Hide resolved
@Kazuhiro-Mimaki Kazuhiro-Mimaki force-pushed the Kazuhiro-Mimaki/media-feature-name-no-unknown branch 2 times, most recently from e5ce4e0 to 51ec481 Compare May 8, 2024 10:41
@ematipico
Copy link
Member

@Kazuhiro-Mimaki the PR has some conflicts

@Kazuhiro-Mimaki Kazuhiro-Mimaki force-pushed the Kazuhiro-Mimaki/media-feature-name-no-unknown branch 2 times, most recently from 9f180c3 to cb86b65 Compare May 10, 2024 00:11
@ematipico
Copy link
Member

@togami2864 can you review and merge?

Copy link
Contributor

@togami2864 togami2864 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Could you rebase?

@Kazuhiro-Mimaki Kazuhiro-Mimaki force-pushed the Kazuhiro-Mimaki/media-feature-name-no-unknown branch from cb86b65 to 3f45256 Compare May 10, 2024 11:31
@ematipico ematipico merged commit 0a3588e into biomejs:main May 10, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Diagnostic Area: diagnostocis A-Project Area: project L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📎 Implement media-feature-name-no-unknown
5 participants