Search code examples
sass-lint

Sass-lint, ignore nesting


How to ignore this error: Class should be nested within its parent Class force-element-nesting. I don't knwo how to ingore this error when I'm overriding soem classes with a lot of nesting in one line like:

// sass-lint:disable ???

.one.two.three.four .soemthing .else,
.one.three.hello .another. else 
{
    //
}

Currently I'm using // sass-lint:disable-all for all blocks.


Solution

  • It should work with this:

    // sass-lint:disable force-element-nesting
    
    .one.two.three.four .soemthing .else,
    .one.three.hello .another. else 
    {
        //
    }
    
    // sass-lint:enable force-element-nesting
    

    Enabling again to restore the rule.