Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BEM - Modifier regex not correctly #319

Closed
JeroenNelen opened this issue Dec 12, 2014 · 2 comments
Closed

BEM - Modifier regex not correctly #319

JeroenNelen opened this issue Dec 12, 2014 · 2 comments
Labels

Comments

@JeroenNelen
Copy link

Hello,

I am using SCSS-lint to enforce the BEM syntax but it seems to want modifiers to be prefixed by one dash - in stead of two dashes --.

As I understand, it should normally work with two dashes.
For example, my block is jn-button (jn prefix, button is my block) and when I want to add a modifier I normally write it like this: jn-button--primary but this fails the scss lint.

It allows jn-button-primary but then I can no longer see which part is the block and which part is the modifier.

Or am I overlooking anything?

Kind regards,

@trotzig
Copy link
Contributor

trotzig commented Dec 12, 2014

Hi Jeroen,

You should be able to switch to the hyphenated_BEM convention in your scss-lint config.

linters:
  SelectorFormat:
    convention: hyphenated_BEM

See these issues for more detail: #318, #254.

@trotzig trotzig closed this as completed Dec 12, 2014
@JeroenNelen
Copy link
Author

Hello Trotzig, thanks for your reply! This indeed works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants