I am using Hound CI as my code style cop, and BEM for my css naming, and Hound doesn't like BEM. How do you configure Hound to avoid commenting on BEM class names?
Asked
Active
Viewed 97 times
0
-
Could tell us what you've got setup with Hound and BEM thus far so we know what point you're at with it? – Peter David Carter Jun 01 '16 at 14:52
1 Answers
0
Hound uses SCSS-lint for SCSS linting rules. To get Hound to account for BEM, we need to set the linter's selectorFormat convention to hyphenated_BEM
. Here's one way to do so:
Hound looks for a .hound.yml
file for your initial configuration. So, lets start by telling Hound to use a specific SCSS linter config file:
#.houndl.yml
scss:
config_file: .scss-linter-config.yml
Then we can set up our custom config in our SCSS linter file:
#.scss-linter-config.yml
linters:
SelectorFormat:
enabled: true
convention: hyphenated_BEM
We should now get Hound comments that apply to BEM!

Jason Ramirez
- 1
- 2