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 noUnknownTypeSelector #2871

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Kazuhiro-Mimaki
Copy link
Contributor

Closes #2543

Summary

implements selector-type-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 15, 2024
@Kazuhiro-Mimaki Kazuhiro-Mimaki changed the title Kazuhiro mimaki/selector type no unknown feat(biome_css_analyzer): implement noUnknownTypeSelector May 15, 2024
@Kazuhiro-Mimaki Kazuhiro-Mimaki force-pushed the Kazuhiro-Mimaki/selector-type-no-unknown branch from e64097d to 1ab268f Compare May 15, 2024 12:58
Copy link

codspeed-hq bot commented May 15, 2024

CodSpeed Performance Report

Merging #2871 will not alter performance

Comparing Kazuhiro-Mimaki:Kazuhiro-Mimaki/selector-type-no-unknown (1ab268f) with main (55070fd)

Summary

✅ 99 untouched benchmarks

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!

version: "next",
name: "noUnknownTypeSelector",
language: "css",
recommended: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
recommended: false,
recommended: true,
sources: &[RuleSource::Stylelint("selector-type-no-unknown")],

.note(markup! {
"See "<Hyperlink href="https://developer.mozilla.org/en-US/docs/Web/CSS/Type_selectors">"MDN web docs"</Hyperlink>" for more details."
}).note(markup! {
"To resolve this issue, replace the unknown type selector with valid one."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"To resolve this issue, replace the unknown type selector with valid one."
"Consider replacing the unknown type selector with valid one."

Comment on lines +181 to +183
fn is_custom_element(prop: &str) -> bool {
prop.contains('-') && prop.eq(prop.to_lowercase().as_str())
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You should define this outside of the function.

Choose a reason for hiding this comment

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

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 selector-type-no-unknown
3 participants