hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

at rule in scss #94

Closed nathanredblur closed 4 years ago

nathanredblur commented 5 years ago
@function em($pixels, $base: $base--font-size) {
  @if (unitless($pixels)) {
    $pixels: $pixels * 1px;
  }

  @if (unitless($base)) {
    $base: $base * 1px;
  }

  @return ($pixels / $base) * 1em;
}

Error: 10:3 ✖ Expected at-rule to come before at-rule with a block order/order

hudochenkov commented 5 years ago

What is your config? What do you expect should happen?

Grawl commented 1 year ago

Just faced the same issue

Grawl commented 1 year ago

@nathanredblur the solution for this problem is to add a custom block after order/order rules:

        "order/order": [
            <all rules>
            {
                "type": "at-rule",
                "name": "return",
                "hasBlock": false
            }
        ],