【问题标题】:Is there a rule to prevent empty lines at the beginning of the block?是否有防止块开头出现空行的规则?
【发布时间】:2018-09-06 08:09:33
【问题描述】:

是否有stylelint规则来获取以下内容?

我已经阅读了文档,但我找不到一个

/* bad */
a {

  color: pink;
}

/* good */
a {
  color: pink;
}

【问题讨论】:

    标签: stylelint


    【解决方案1】:

    这解决了我的问题

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-08-21
      • 2020-06-05
      • 2020-03-09
      • 1970-01-01
      • 1970-01-01
      • 2016-05-15
      • 1970-01-01
      • 2021-12-21
      相关资源
      最近更新 更多