Skip to main content

annotation-no-unknown

禁止未知注释。

¥Disallow unknown annotations.

a { color: green !imprtant; }
/** ↑

* This annotation */

此规则认为 CSS 规范中定义的注释(直至并包括编辑草稿)是已知的。

¥This rule considers annotations defined in the CSS Specifications, up to and including Editor's Drafts, to be known.

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

选项

¥Options

true

以下模式被认为是一个问题:

¥The following pattern is considered a problem:

a {
color: green !imprtant;
}

以下模式不被视为问题:

¥The following pattern is not considered a problem:

a {
color: green !important;
}

可选的辅助选项

¥Optional secondary options

ignoreAnnotations: ["/regex/", /regex/, "string"]

鉴于:

¥Given:

["/^--foo-/", "--bar"]

以下模式不被视为问题:

¥The following patterns are not considered problems:

a {
color: green !--foo--bar;
}
a {
color: green !--bar;
}