postcss / postcss-bem-linter

A BEM linter for postcss
MIT License
571 stars 35 forks source link

Added "include" as allowed at-rule in hasOnlyAllowedAtRules function #146

Open DKvistgaard opened 5 years ago

DKvistgaard commented 5 years ago

This extends the fix in #140, but fixes linting for selectors that only includes at-rules with @include within it for better Sass/SCSS support.

The error:

/** @define foo */

.foo {}

// This selector is ignored even though it's an error, as it only contains
// an @include at-rule
.bar {
    @include col-init();
}

// This is also ignored even though it contains the allow @extend at-rule as it
// also includes the @include at-rule and no other styling properties
.test {
    @include col-init();

    @extend %test-extend;
}