Unknown rule function-calc-no-invalid.Stylelint(function-calc-no-invalid)

2022-05-06 17:24:52 浏览数 (1)

项目场景:

  • React 项目
  • Umi框架
  • Mac系统
  • VScode

问题描述

安装StyleLint 检查css,出现问题。

styleint 配置:

代码语言:javascript复制
{
  "extends": ["stylelint-config-standard", "stylelint-config-rational-order", "stylelint-prettier/recommended"],
  "overrides": [
    {
      "files": ["src/**/*.less"],
      "customSyntax": "postcss-less"
    }
  ],
  "plugins": ["stylelint-order", "stylelint-prettier"],
  "rules": {
    "prettier/prettier": true,
    "no-descending-specificity": null,
    "font-family-no-missing-generic-family-keyword": null,
    "custom-property-pattern": null
  }
}

报错:

Unknown rule function-calc-no-invalid.Stylelint(function-calc-no-invalid)

解决方案:

stylelint-config-standard. 版本过低,更新即可。

官网issue: https://github.com/stylelint/stylelint/issues/5653

0 人点赞