Unexpected unknown property for SCSS exports

Hello, we’re implementing SonarQube for our project and are facing a few issues, in particular, we’re heavily using the “SCSS to JS” export pattern as described here: https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass


// styles/animation.scss
$animation-length: 250;
$animation-length-ms: $animation-length + 0ms;

:export {
  animationMillis: $animation-length-ms;

Sonar CSS will report an error:
Unexpected unknown property "animationMillis"

I can see a related closed issue https://github.com/SonarSource/sonar-css/issues/149 but I’m not sure to understand how to solve this false positive.

1 Like