tagliala
tagliala

Reputation: 189

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

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;
}

Upvotes: 4

Views: 1323

Answers (1)

tagliala
tagliala

Reputation: 189

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

Upvotes: 4

Related Questions