-
-
Notifications
You must be signed in to change notification settings - Fork 495
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(linter): add NoUnknownAtRule #4689
Conversation
This reverts commit 33b16a6.
/* TODO: the parser not supported yet */ | ||
/* @position-try --foo {} | ||
@view-transition { | ||
navigation: auto; | ||
} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
filed as an issue #4685
fn diagnostic(_: &RuleContext<Self>, node: &Self::State) -> Option<RuleDiagnostic> { | ||
let span = node.range; | ||
let name = &node.name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fn diagnostic(_: &RuleContext<Self>, node: &Self::State) -> Option<RuleDiagnostic> { | |
let span = node.range; | |
let name = &node.name; | |
fn diagnostic(_: &RuleContext<Self>, state: &Self::State) -> Option<RuleDiagnostic> { | |
let span = state.range; | |
let name = &state.name; |
.note(markup! { | ||
""<Emphasis>{ name }</Emphasis>" is not a standard CSS at-rule, which may lead to unexpected styling results or failure to interpret the styles as intended." | ||
}).note(markup! { | ||
"See "<Hyperlink href="https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule">"MDN web docs"</Hyperlink>" for more details." | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end, we need to suggest a solution to the user (see the three rule pillars). In this case, we should suggest to remove it. (another alternative is to list all the known rules, but I think it's too much)
CodSpeed Performance ReportMerging #4689 will improve performances by 6.79%Comparing Summary
Benchmarks breakdown
|
Summary
close #4688
Test Plan
added tests and updated snapshots