stylelint-scss规范
| 规则 | 说明 |
|---|---|
| “at-import-no-partial-leading-underscore” :true | @import 命名不允许下划线 |
| “at-import-partial-extension”:“never” | @import中不包含.scss扩展名 |
| “at-mixin-argumentless-call-parentheses”: “never” | @include调用时不加() |
| “at-mixin-named-arguments”:”always” | @include调用时参数问题 |
| “at-mixin-parentheses-space-before”: “never” | @mixin 命名与()之间的空格 |
| “dollar-variable-colon-space-after”: “always” | $变量:后加空格 |
| “dollar-variable-first-in-block”: [true,{ ignore: [“comments”, "imports”]}] | $变量放在每块的最前面 |
| “declaration-nested-properties”:“never” | 使用- 如margin-top |
| “declaration-nested-properties-no-divided-groups”:true | 不许将相同命名空间的嵌套属性划分为多个组 |
stylelint-config-standard规范
| 规则 | 说明 |
|---|---|
| “font-family-name-quotes”: “always-unless-keyword” | 字体引号 |
| “function-url-quotes”: “never” | url引号 |
| “string-quotes”: “single” | 使用单引号 |
| “max-nesting-depth”: 5 | 最大嵌套深度 |
| “declaration-no-important”: true | 不允许!important |
| “selector-max-pseudo-class”: 3 | class后最多 : 数 |
| “selector-no-qualifying-type” :true | 不允许类型限制选择器 |
| “font-weight-notation” :“numeric” | font-weight格式 |
| “length-zero-no-unit”: true | 禁止单位0长度 |
| “value-list-comma-space-after”: “always” | 列表值需要一个空格 |
| ”declaration-block-semicolon-space-after“: “always-single-line” | 块内每个属性一行 |
| “block-closing-brace-newline-after”: “always-single-line” | 每个块占单独行 |
| “block-opening-brace-newline-after”: “always” | 大括号{后新的一行 |
| “block-opening-brace-space-before”: “always” | 大括号{前空格 |
| “indentation” : 4 | 四个空格缩进 |
| “no-duplicate-selectors”: true | 不允许重复选择器 |
| “no-eol-whitespace”: true | 不允许行尾空白 |
| “no-extra-semicolons”: true | 不允许额外分号 |
2万+




被折叠的 条评论
为什么被折叠?



