sonar-css-plugin
sonar-css-plugin copied to clipboard
Parent selector (&) not supported in variable declaration
I'm getting a
Unable to parse file ... Parse error at line ...
And the error points to
$this: &;
the & character.
This is a perfectly valid SCSS syntax, how come it's throwing errors?
Same issue here using v4.18:
[linux_eslint] ERROR: Parse error at line 35 column 10:
[linux_eslint]
[linux_eslint] 29: $panelPosLeft: (xs: translateX(100%), lg: none);
[linux_eslint] 30: $panelLeft: (xs: -100%, lg: 0);
[linux_eslint] 31: $panelGlobalDimension: (xs: calc(100vh - 60px), lg: auto);
[linux_eslint] 32: $panelTransition: (xs: transform $timing0-3 ease, lg: none);
[linux_eslint] 33:
[linux_eslint] 34: .navigation {
[linux_eslint] 35: $root: &;
[linux_eslint] ^
Can you please confirm if it's going to be fixed in v4.19, and when this version will be available?
Thanks
I built https://github.com/racodond/sonar-css-plugin/pull/118 locally, it's working fine.
Let's hope it's merged to the plugin soon. :)
Hi,
The issue is indeed fixed. As you can see in the builds, everything works fine for the LTS version (6.7), but not for the latest release (issue related to custom rules, nothing related to this issue). I just want to find some time to fix the issue related to the latest SonarQube version before releasing a version fixing this issue.
David