sds / scss-lint

Configurable tool for writing clean, consistent SCSS
MIT License
3.66k stars 465 forks source link

NameFormat should respect hyphenated_BEM #472

Closed olafgleba closed 9 years ago

olafgleba commented 9 years ago

It is likely to define a placeholder which also follows the hyphentated BEM Syntax. It would be great if the convention configuration option would additionally provide the hyphernated_BEM. To avoid struggling with {type}_convention.

sds commented 9 years ago

Hey @olafgleba,

We explicitly removed the BEM convention from NameFormat in f73135a47b5 since it didn't really make any sense (since BEM only applies to selectors). Placeholders aren't really selectors in this case.

Since the SelectorFormat linter also lints placeholders, it seems like we should just remove placeholders from the NameFormat linter's purview. Any objections?

olafgleba commented 9 years ago

Hi @sds,

yeah, i fully agree. I was wondering why placeholders are included in both linters anyway. So removing placeholders from NameFormat would be fine by me.

Might prevent such mixed up issues like https://github.com/brigade/scss-lint/issues/451 also because no clashing possible then. And the necessity to disable NameFormat inline when using placeholders with the hyphenated_BEM Syntax (as a valid workaround).

Thanks for your answer!

sds commented 9 years ago

I've removed placeholder linting from NameFormat in b919a4228d1e885faacf03cbec5c0a2d2ac63a37. Thanks for your feedback, @olafgleba.