Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
suppress Lint警告:StyleLint SCSS_Css_Lint_Stylelint - Fatal编程技术网

suppress Lint警告:StyleLint SCSS

suppress Lint警告:StyleLint SCSS,css,lint,stylelint,Css,Lint,Stylelint,我不熟悉scss文件中的linting,我有一个带有以下scss文件的角度项目 p { margin-left: 10px; margin-top: 9px; } ::ng-deep .expandButton { margin: 10px; color: teal; border: none; background: transparent; } a.mat-list-item.ng-tns-c1-0.active { background : #eff0f1;

我不熟悉scss文件中的linting,我有一个带有以下scss文件的角度项目

p {
  margin-left: 10px;
  margin-top: 9px;
}

::ng-deep .expandButton {
  margin: 10px;
  color: teal;
  border: none;
  background: transparent;
}

a.mat-list-item.ng-tns-c1-0.active {
  background : #eff0f1;
  font-weight: bold;
  color: black;
  border-right: 3px solid teal;
}
以及用于lint规则的.yml文件

rules:
  declaration-no-important: null  
  scss/at-rule-no-unknown: null
在构建代码或执行以下命令时,我发现以下错误:

 1:1  ×  Unknown rule at-rule-disallowed-list                     at-rule-disallowed-list
 1:1  ×  Unknown rule declaration-property-value-disallowed-list  declaration-property-value-disallowed-list
如何修复/抑制此警告,生成过程通过,没有错误,但这两行将继续出现在所有scss文件中。

当stylelint在配置对象中遇到它无法识别的规则时,将显示
未知规则
错误

已删除
at规则不允许列表
声明属性值不允许列表
规则

您可以通过以下任一方法修复这些错误:

  • 正在将stylelint更新到至少版本
    13.7.0
  • 从配置对象中删除规则

无论我是否为这些规则指定值,我都会遇到这个问题。linter告诉我
at rule disallowed list
查找
数组
,而
声明属性值disallowed list
获取一个
对象。