Supress Lint Warnings : StyleLint SCSS
Asked Answered
G

1

6

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.

Goldia answered 30/10, 2020 at 6:39 Comment(1)
I experience this issue as well, whether I specify values for these rules or not. The linter tells me the at-rule-disallowed-list looks for an Array and the declaration-property-value-disallowed-list takes an Object.Tegument
C
6

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
Ciliata answered 3/12, 2020 at 17:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.