【发布时间】:2021-02-12 15:22:50
【问题描述】:
我是 scss 文件中 linting 的新手,我有一个带有以下 scss 文件的 Angular 项目
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
在构建代码或执行以下命令 stylelint **.scss 时,我收到以下错误,
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 文件都继续出现。
【问题讨论】:
-
我也遇到了这个问题,无论我是否为这些规则指定值。 linter 告诉我
at-rule-disallowed-list寻找Array而declaration-property-value-disallowed-list需要Object。