尝试通过postcss使用嵌套规则,但在下面收到警告。我需要在stylelint文件中添加哪些规则来修复这些警告?
这是css:
.count-sec {
height: 520px;
& p {
color:#fff;
margin: 0;
}
}
警告:
Expected a trailing semicolon (declaration-block-trailing-semicolon) [stylelint]
Expected newline before "}" of a multi-line block (block-closing-brace-newline-before) [stylelint]
答案 0 :(得分:1)
预期有一个尾随的分号(声明 - 块 - 尾随 - 分号)[stylelint]
您应该将规则declaration-block-trailing-semicolon
更改为"always"
(https://stylelint.io/user-guide/rules/declaration-block-trailing-semicolon/)
多行块“}”之前的预期换行符(block-closing-brace-newline-before)[stylelint]
您应该将规则block-closing-brace-newline-before
更改为"always"
(https://stylelint.io/user-guide/rules/block-closing-brace-newline-before/)