property-allowed-list
許可されたプロパティのリストを指定します。
a { display: block; }
/** ↑
* This property */
このルールは、変数($sass
、@less
、--custom-property
)を無視します。
message
セカンダリオプションは、このルールの引数を受け入れることができます。
オプション
array|string|regex
: ["array", "of", /properties/, "regex"]|"property"|"/regex/"|/regex/
文字列が "/"
で囲まれている場合(例:"/^background/"
)、正規表現として解釈されます。これにより、たとえば、/^background/
は background
、background-size
、background-color
などにマッチするなど、ショートハンドを簡単にターゲットにすることができます。
指定された場合
["display", "animation", "/^background/"]
以下のパターンは問題とみなされます
a { color: pink; }
a {
animation: my-animation 2s;
color: pink;
}
a { borkgrund: orange; }
以下のパターンは問題とはみなされません
a { display: block; }
a { -webkit-animation: my-animation 2s; }
a {
animation: my-animation 2s;
-webkit-animation: my-animation 2s;
display: block;
}
a { background: pink; }
a { background-color: pink; }