postcss / postcss-bem-linter

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

Namespaces are confused as selectors #154

Open OddieWallie opened 4 years ago

OddieWallie commented 4 years ago

In our scss we group some of our attributes in their namespace.

.block__element--modifier {
  font: {
    family: sans-serif;
    size: 16px;
    weight: 300;
  }
}

When linting, I get a Invalid component selector ".block__element--modifier font:" error. I'm using the bem preset

Since namespaces could be anything (font:, background:, text:, etc); I tried adding an ignoreSelectors rule to target these. I couldn't find an expression which worked.

Is there something which already resolves this issue (not sure if I've missed something)?