Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sonarqube css: How to disable "Unexpected unknown type" rule for selectors with prefix "pr-"

I am running sonarqube's CSS analyzer over my Angular 7 project and it is marking all references to material2 elements in my scss as critical bugs.

For example:

Unexpected unknown type selector "mat-form-field"

How do I add exceptions for selectors with the "mat-" prefix using the sonar-project.properties file?

I've tried a number of different variations on what I've found here but I've been unable to find an example of this done in a properties file.

I'm looking for something like this:

sonar.css.selector-type-no-unknown.ignoreTypes=["/^mat-/"]

like image 463
colin-bilkins Avatar asked Apr 18 '19 09:04

colin-bilkins


1 Answers

There is a parameter in StyleLint for that situation:

"rules": {
     "selector-type-no-unknown": [true, { "ignoreTypes": ["/^mat-/","/^retrace-/"] }]
  }
like image 146
Kavinda Senarathne Avatar answered Nov 15 '22 07:11

Kavinda Senarathne