stylelint - 是否有防止块开头出现空行的规则?
问题描述
是否有获取以下内容的 stylelint 规则?
我已阅读文档,但找不到
/* bad */
a {
color: pink;
}
/* good */
a {
color: pink;
}
解决方案
这解决了我的问题
"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
推荐阅读
- .htaccess - .htaccess 和多个意外重定向
- c# - 我应该修改实体框架生成的类吗?
- swift - phasset 子类型 rawValue 意味着 swift
- xpath - 如何从 Camel XPathBuilder XPath 表达式中获取 Java Date 对象?
- android - 在 Android 应用程序中进行输入时如何自定义虚拟键盘的“Enter”并处理其点击操作?
- java - 如何在单独的列表中检索字符串矩阵的对角线?
- javascript - 普通对象 VS 模型对象的类实例
- c++ - 通过嵌入式 IWebBrowser2 控件中的链接打开 youtube 搜索失败
- c# - Unity 2018 - OnAudioFilterRead() 从缓冲区实时播放
- go - 使用协议缓冲区错误进行构建:结构初始化程序中的值太少