无法在 stylelint 中将 block-no-empty 设置为 false

Cannot set block-no-empty to false in stylelint

鉴于 package.json 中的以下内容:

"stylelint": { "extends": "stylelint-config-standard", "rules": { "string-quotes": "single", "block-no-empty": false, "indentation": 2 } } 我无法弄清楚如何覆盖 block-no-empty。如果我将它设置为 false,我会得到错误:

Invalid Option: Unexpected option value "false" for rule "block-no-empty"

我是否缺少某种覆盖语法?

使用 null 关闭规则,例如"block-no-empty": null.

可以在 configuration guide 中找到更多详细信息。

stylelint-config-standard 自述文件中还有 an example 展示了如何扩展配置和关闭规则。