feat(biome_css_analyzer): noUnknownFunction#2570
Conversation
| "hwb", | ||
| "hypot", | ||
| "image", | ||
| "image-rect", |
There was a problem hiding this comment.
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
|
|
||
| /// 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.
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.
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 |
togami2864
left a comment
There was a problem hiding this comment.
Looks good. Could you rebase?
Summary
close #2530
Implement function-no-unknown
Test Plan
added tests and snapshots