Skip to content

Files

Latest commit

 

History

History
113 lines (76 loc) · 1.29 KB

rule-non-nested-empty-line-before.md

File metadata and controls

113 lines (76 loc) · 1.29 KB

Pattern: Malformed empty line before non-nested rule

Issue: -

Description

Require or disallow an empty line before non-nested rules.

a {}
      /* ← */
b {}  /* ↑ */
/**      ↑
 * This line */

If the rule is the very first node in a stylesheet then it is ignored.

Examples

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

"always"

There must always be an empty line before rules.

The following patterns are considered warnings:

a {} b {}
a {}
b {}

The following patterns are not considered warnings:

a {}

b {}

"never"

There must never be an empty line before rules.

The following patterns are considered warnings:

a {}

b {}

The following patterns are not considered warnings:

a {} b {}
a {}
b {}

"always-multi-line"

There must always be an empty line before multi-line rules.

The following patterns are considered warnings:

a
{}
b
{}

The following patterns are not considered warnings:

a
{}

b
{}

"never-multi-line"

There must never be an empty line before multi-line rules.

The following patterns are considered warnings:

a
{}

b
{}

The following patterns are not considered warnings:

a
{}
b
{}