Require or disallow a trailing semicolon within declaration blocks.
a { background: orange; color: pink; }
/** ↑
* This semicolon */
The trailing semicolon is the last semicolon in a declaration block and it is optional.
此规则忽略:
- Less mixins
- trailing
//
comments - declaration blocks containing nested (at-)rules
命令行中的 --fix
选项可以自动修复此规则报告的所有问题。
string
: "always"|"never"
There must always be a trailing semicolon.
以下模式被视为违规:
a { color: pink }
a { background: orange; color: pink }
a { @include foo }
以下模式不被视为违规:
a { color: pink; }
a { background: orange; color: pink; }
a { @include foo; }
There must never be a trailing semicolon.
以下模式被视为违规:
a { color: pink; }
a { background: orange; color: pink; }
以下模式不被视为违规:
a { color: pink }
a { background: orange; color: pink }