Sha256: 7dc59dfe9cf944523e124016881e8c71d62774b3b78522dd73af07b18492c168

Contents?: true

Size: 1.72 KB

Versions: 24

Compression:

Stored size: 1.72 KB

Contents

# declaration-block-semicolon-newline-before

Require a newline or disallow whitespace before the semicolons of declaration blocks.

<!-- prettier-ignore -->
```css
  a {
    color: pink
    ; top: 0;
  } ↑
/** ↑
 * The newline before this semicolon */
```

This rule ignores semicolons that are preceded by Less mixins.

## Options

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

### `"always"`

There _must always_ be a newline before the semicolons.

The following patterns are considered violations:

<!-- prettier-ignore -->
```css
a { color: pink; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink; top: 0;
}
```

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
a { color: pink
; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink
  ; top: 0;
}
```

### `"always-multi-line"`

There _must always_ be a newline before the semicolons in multi-line rules.

The following patterns are considered violations:

<!-- prettier-ignore -->
```css
a {
  color: pink; top: 0;
}
```

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
a { color: pink; }
```

<!-- prettier-ignore -->
```css
a { color: pink; top: 0; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink
  ; top: 0;
}
```

### `"never-multi-line"`

There _must never_ be whitespace before the semicolons in multi-line rules.

The following patterns are considered violations:

<!-- prettier-ignore -->
```css
a {
  color: pink
  ; top: 0;
}
```

The following patterns are _not_ considered violations:

<!-- prettier-ignore -->
```css
a { color: pink; }
```

<!-- prettier-ignore -->
```css
a { color: pink; top: 0; }
```

<!-- prettier-ignore -->
```css
a {
  color: pink;
  top: 0;
}
```

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.7 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.6 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.5 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.4 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.3 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.2 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.1 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.3.5 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-5.0.0 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.3.4 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.3.3 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.3.2 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.3.1 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.3 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.2.3 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.2.2 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.2.1 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.2 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md
trusty-cms-4.1.9 node_modules/stylelint/lib/rules/declaration-block-semicolon-newline-before/README.md