-
-
Notifications
You must be signed in to change notification settings - Fork 524
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): noUnknownFunction #2570
Conversation
"hwb", | ||
"hypot", | ||
"image", | ||
"image-rect", |
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.
You can remove this one, -o-image-rect
, -ms-image-rect
, -o-image-rect
and -webkit-image-rect
.
It's the only non-prefixed function name which is bogus AFAIK.
Keep-moz-image-rect
though.
https://caniuse.com/mdn-css_properties_background-image_image-rect
https://bugs.webkit.org/show_bug.cgi?id=32177
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.
I have removed them.
|
||
/// List of known CSS value functions sourced from [`css-functions-list`](https://www.npmjs.com/package/css-functions-list). | ||
/// See the original list [here](https://github.com/niksy/css-functions-list/blob/master/index.json). | ||
pub const FUNCTION_KEYWORDS: [&str; 671] = [ |
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.
These are ordered entries. We should use binary_search
instead of contains
(it's faster).
Although, entries must be ordered. So we should add some tests for that. We do the same with other constants
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.
I have sorted the entries and updated the code to use binary_search
instead of contains
.
CodSpeed Performance ReportMerging #2570 will not alter performanceComparing Summary
|
I apologize for the confusion. I accidentally pushed changes to the |
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.
Looks good. Could you rebase?
Summary
close #2530
Implement function-no-unknown
Test Plan
added tests and snapshots