matype / stylefmt

stylefmt is a tool that automatically formats stylesheets.
Other
2.1k stars 89 forks source link

add support for declaration-empty-line-before #270

Closed modosc closed 7 years ago

modosc commented 7 years ago

see #256

this supports everything except ignore: ['inside-single-line-block'] which i think is related to block-closing-brace-newline-before support (the code seems to work but a newline is always added before the closing brace).

matype commented 7 years ago

@modosc Great work! Thanks :)

danyim commented 7 years ago

Is this working as intended for SCSS? Running stylefmt on the following removes the empty line between the variable $image-width and the property position: ..., causing the stylelint error declaration-empty-line-before to appear.

img {
  $image-width: 75vw;
  position: absolute; // <-- Error: Expected empty line before declaration
}

I have to append the line /* stylelint-disable-line declaration-empty-line-before */ to the end in order to get rid of the linting issues, but I was wondering if stylefmt should remove that empty line to begin with.

modosc commented 7 years ago

@danyim can you open this as a separate issue? also can you include your specific declaration-empty-line-before config?