swissquote / crafty

The task runner that binds them all
https://swissquote.github.io/crafty/
Apache License 2.0
30 stars 12 forks source link

[stylelint] rule swissquote/no-type-outside-scope #11

Closed alexandratodiruta closed 5 years ago

alexandratodiruta commented 6 years ago

Stylelint reports the rule swissquote/no-type-outside-scope four times instead of one for the following:

.Section--news a:focus {
    .MediaObject, .MediaObject__content {
        overflow: visible;
    }

    .MediaObject__content__first {
        box-shadow: 0 0 2px 2px var(--color-focus);
    }

    .MediaObject__content__secondary {
        margin-left: 1rem;
    }
}

 134:5   ✖  Types are allowed only inside a scope                                   swissquote/no-type-outside-scope  
 134:5   ✖  Types are allowed only inside a scope                                   swissquote/no-type-outside-scope  
 138:5   ✖  Types are allowed only inside a scope                                   swissquote/no-type-outside-scope  
 142:5   ✖  Types are allowed only inside a scope                                   swissquote/no-type-outside-scope  
onigoetz commented 5 years ago

Finally fixed, This was a messy thing to fix, due to the poor collaboration between postcss, postcss-resolve-nested-selector and postcss-selector-parser

If you're curious on how it's solved :

https://github.com/swissquote/crafty/compare/6c84992a401d624ccaf1fcca070cc34eb6837afb...b7466ee0f4582e47e162cb73eb1799ef3cb6f2ae