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

"class-style": "bem" does not accept any dash in class name. #195

Closed
akumanara opened this issue May 27, 2020 · 4 comments · Fixed by #196
Closed

"class-style": "bem" does not accept any dash in class name. #195

akumanara opened this issue May 27, 2020 · 4 comments · Fixed by #196

Comments

@akumanara
Copy link

As you can see in the naming conventions (Naming rules) for BEM below, it says the following:
Words are separated by a hyphen (-).

So for example, the class class="hp-intro__logo" is valid, but the linter throws the following error.
Value "" of attribute "class" does not respect the format: bem

Resource:
https://en.bem.info/methodology/naming-convention/#naming-rules

@KamiKillertO
Copy link
Collaborator

@akumanara I cannot reproduce your issue 😞 . Can you provide the following information to help me?

  • Your version od linthtml
  • you config file
  • the HTML causing the issue

@akumanara
Copy link
Author

@KamiKillertO Thanks for your response, i just saw that it didnt like an extra space! my bad!
Cheers

@KamiKillertO
Copy link
Collaborator

Happy to here that there's no issue with the bem analyzer 😊 . But there is still an issue here, the linter should not report an issue for spaces ><

@akumanara
Copy link
Author

akumanara commented May 27, 2020

Happy to here that there's no issue with the bem analyzer 😊 . But there is still an issue here, the linter should not report an issue for spaces ><

Fun times!
in that case you can see the error in the following section (it has 2 spaces after hp-intro)
<section class="hp-intro section-space">

Update: the github code format ommits the second space.

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

Successfully merging a pull request may close this issue.

2 participants