Skip to content

Commit c554a0e

Browse files
authored
Fix false positive for nesting-selector-no-missing-scoping-root (#365)
* build: update stylelint dependency * fix: add mixins to ignore list Affected rule: nesting-selector-no-missing-scoping-root * test: update valid scss to include selector in mixins Testing for nesting-selector-no-missing-scoping-root
1 parent c554872 commit c554a0e

File tree

4 files changed

+57
-46
lines changed

4 files changed

+57
-46
lines changed

__tests__/valid.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ $postfix: if($infix != '', $infix + '-down', '');
3939
border-style: solid;
4040
border-width: math.div($size, 2);
4141

42+
&:hover {
43+
transform: translate(0, 8px);
44+
}
45+
4246
@if $direction == up {
4347
border-bottom-color: $color;
4448
} @else if $direction == right {

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ module.exports = {
1919
'function-no-unknown': null,
2020
'media-feature-name-value-no-unknown': null,
2121
'media-query-no-invalid': null,
22+
'nesting-selector-no-missing-scoping-root': [
23+
true,
24+
{
25+
ignoreAtRules: ['mixin'],
26+
},
27+
],
2228
'no-invalid-position-at-import-rule': [
2329
true,
2430
{

package-lock.json

Lines changed: 45 additions & 44 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
"npm-run-all2": "^8.0.4",
4040
"prettier": "^3.6.2",
4141
"remark-cli": "^12.0.1",
42-
"stylelint": "^16.23.1"
42+
"stylelint": "^16.24.0"
4343
},
4444
"peerDependencies": {
4545
"postcss": "^8.3.3",
46-
"stylelint": "^16.23.1"
46+
"stylelint": "^16.24.0"
4747
},
4848
"peerDependenciesMeta": {
4949
"postcss": {

0 commit comments

Comments
 (0)