stylefmt icon indicating copy to clipboard operation
stylefmt copied to clipboard

Single line formatting

Open svipas opened this issue 8 years ago • 1 comments

Hello,

how to make this to NOT format, let it be in 1 line as it is i. e. here:

a { color: #fff; }

What rules do I need configure and HOW? Because I tried everything and still, it formats that code above to:

a {
  color: #fff;
}

svipas avatar Apr 24 '17 23:04 svipas

Looking at the Stylelint docs says that the following should work:

{
  "rules": {
    "block-opening-brace-newline-after": "always-multi-line",
    "block-closing-brace-newline-before": "always-multi-line"
  }
}

Here's the quote from the FAQs

To allow single-line blocks but enforce newlines with multi-line blocks, use the "always-multi-line" option for both rules.

Looking at the tests it seems like this might not be what stylefmt is expecting. This might be a bug.

kilmc avatar May 23 '17 21:05 kilmc