Skip to content

Files

Latest commit

60dcf28 · Jan 22, 2019

History

History
153 lines (104 loc) · 2.02 KB

File metadata and controls

153 lines (104 loc) · 2.02 KB

block-opening-brace-space-after

Require a single space or disallow whitespace after the opening brace of blocks.

  a { color: pink; }
/** ↑
 * The space after this brace */

命令行中的 --fix 选项可以自动修复此规则报告的所有问题。

选项

string: "always"|"never"|"always-single-line"|"never-single-line"|"always-multi-line"|"never-multi-line"

"always"

There must always be a single space after the opening brace.

以下模式被视为违规:

a {color: pink; }
a {
color: pink; }

以下模式被视为违规:

a { color: pink; }
a { color: pink;
}

"never"

There must never be whitespace after the opening brace.

以下模式被视为违规:

a { color: pink; }
a {
color: pink; }

以下模式被视为违规:

a {color: pink; }
a
{color: pink; }

"always-single-line"

There must always be a single space after the opening brace in single-line blocks.

以下模式被视为违规:

a {color: pink; }

以下模式被视为违规:

a { color: pink; }
a {color: pink;
}

"never-single-line"

There must never be whitespace after the opening brace in single-line blocks.

以下模式被视为违规:

a { color: pink; }

以下模式被视为违规:

a {color: pink; }
a { color: pink;
}

"always-multi-line"

There must always be a single space after the opening brace in multi-line blocks.

以下模式被视为违规:

a {color: pink;
}

以下模式被视为违规:

a {color: pink; }
a { color: pink;
}

"never-multi-line"

There must never be whitespace after the opening brace in multi-line blocks.

以下模式被视为违规:

a { color: pink;
}

以下模式被视为违规:

a { color: pink; }
a {color: pink;
}