Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a rule to prevent empty lines at the beginning of the block?

Tags:

stylelint

Is there a stylelint rule to obtain the following?

I've read the documentation but I wasn't unable to find one

/* bad */
a {

  color: pink;
}

/* good */
a {
  color: pink;
}
like image 225
tagliala Avatar asked Oct 22 '25 15:10

tagliala


1 Answers

This solves my issue

"declaration-empty-line-before": ["always", {
  "except": ["first-nested"],
  "ignore": ["after-comment", "after-declaration"]
}],

Ref: https://stylelint.io/user-guide/rules/declaration-empty-line-before/#first-nested

like image 195
tagliala Avatar answered Oct 27 '25 01:10

tagliala



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!