Skip to content

noUnknownFunction

¥Summary

¥How to configure

biome.json
{
"linter": {
"rules": {
"correctness": {
"noUnknownFunction": "error"
}
}
}
}

¥Description

禁止未知的 CSS 值函数。

¥Disallow unknown CSS value functions.

此规则忽略双破折号自定义函数,例如 --custom-function()

¥This rule ignores double-dashed custom functions, e.g. --custom-function().

已知 CSS 值函数的数据源是:

¥Data sources of known CSS value functions are:

¥Examples

¥Invalid

a { transform: unknown(1); }
code-block.css:1:16 lint/correctness/noUnknownFunction ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Unexpected unknown function: unknown

> 1 │ a { transform: unknown(1); }
^^^^^^^
2 │

Use a known function instead.

See MDN web docs for more details.

¥Valid

a { transform: scale(1); }

¥Related links