Supress Lint Warnings : StyleLint SCSS

Viewed 1799

I new to linting in scss file, I have a angular project with following scss file

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;
}

and a .yml file for lint rules,

rules:
  declaration-no-important: null  
  scss/at-rule-no-unknown: null

while building the code or executing the following command stylelint **.scss, I'm getting the following errors,

 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

How to fix/suppress this warning, the build passes, there are no errors, but these two lines, keep on occurring for all the scss files.

1 Answers

The Unknown rule <rule-name> error is shown when stylelint encounters a rule in the configuration object that it does not recognise.

The at-rule-disallowed-list and declaration-property-value-disallowed-list rules were added to stylelint in version 13.7.0.

You can fix these errors by either:

  • updating your stylelint to at least version 13.7.0
  • removing the rules from your configuration object
Related