stylelint-config-crisp 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylelint-config-crisp",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Custom Stylelint Rules for Crisp",
5
5
  "author": "Crisp IM SAS",
6
6
  "main": "index.js",
@@ -81,10 +81,16 @@ const ruleFunction = (primaryOption, secondaryOptions = {}, context) => {
81
81
 
82
82
  if (!isInterpolated) {
83
83
  // Skip classes elements outside of CSS file scope
84
- if (fileScopeClass &&
85
- rule.selector.startsWith(".") &&
84
+ if (fileScopeClass) {
85
+ if (rule.selector.startsWith(".") &&
86
86
  !rule.selector.startsWith(`.${fileScopeClass}`)) {
87
- return;
87
+ return;
88
+ }
89
+
90
+ if (rule.selector.startsWith("&.") &&
91
+ !rule.selector.startsWith(`&.${fileScopeClass}`)) {
92
+ return;
93
+ }
88
94
  }
89
95
 
90
96
  if (context.fix) {