Stylelint无法识别.stylelintrc文件

时间:2018-06-13 23:04:10

标签: json webstorm stylelint

我已经通过npm安装了最新的stylelint版本,一切都很好。然后,由于stylelint告诉它想要一个.stylelintrc文件,我去了website并获得了所需的规则。然后我创建了一个styleRules.stylintrc.json,但是stylelint拒绝识别它。为什么?另外,我不了解JSON。

以下是.stylelintrc文件中的代码:

{
  "extends": "stylelint-config-standard",
  "rules": {
    "indentation": 4,
    "string-quotes": "double",
    "no-duplicate-selectors": true,
    "color-hex-case": "upper",
    "color-hex-length": "long",
    "color-named": "always-where-possible",
    "selector-combinator-space-after": "always",
    "selector-attribute-quotes": "always",
    "selector-attribute-operator-space-before": "always",
    "selector-attribute-operator-space-after": "always",
    "selector-attribute-brackets-space-inside": "never",
    "declaration-block-trailing-semicolon": "never",
    "declaration-colon-space-before": "never",
    "declaration-colon-space-after": "always",
    "number-leading-zero": "never",
    "function-url-quotes": "always",
    "font-family-name-quotes": "always-where-required",
    "comment-whitespace-inside": "always",
    "comment-empty-line-before": "always",
    "rule-empty-line-before": "always",
    "selector-pseudo-class-parentheses-space-inside": "always",
    "media-feature-range-operator-space-before": "always",
    "media-feature-range-operator-space-after": "always",
    "media-feature-parentheses-space-inside": "never",
    "media-feature-colon-space-before": "never",
    "media-feature-colon-space-after": "always"
  }
}

0 个答案:

没有答案