simonsmith / stylelint-selector-bem-pattern

Stylelint plugin that incorporates postcss-bem-linter
MIT License
244 stars 13 forks source link

Add implicitComponents option. Fixes #24 #26

Closed jrwebdev closed 7 years ago

jrwebdev commented 7 years ago

Added support for the implicitComponents option as detailed here:

https://github.com/postcss/postcss-bem-linter#define-components-and-utilities-implicitly-based-on-their-filename

jrwebdev commented 7 years ago

Failing tests seem unrelated to my change - it appears to be the use of null instead of undefined in the last test. Let me know if you'd like me to change that as I don't really know much about Stylelint.

davidtheclark commented 7 years ago

@jrwebdev: Are you interested in taking over maintenance of this plugin? I do not use it currently, so it would be better off in the hands of an active user.

jackwilsdon commented 7 years ago

implicitComponents doesn't have to be an array, it can be just a string too.

jrwebdev commented 7 years ago

@davidtheclark I'm probably not the best person to pick this up as I'm not too familiar with Stylelint and I was just evaluating it for my company for now. But if we do pick it up I could maybe take it on.

@jackwilsdon this perhaps highlights the above point of me not knowing it too well - I assumed that the array would validate one of _.isBoolean, _.isString or the function for testing for an array of strings. Seemed to work fine when I manually tested it but I'll take another look.

jackwilsdon commented 7 years ago

Oops, I missed the bit where you passed _.isString! Sorry! 😆 😜

davidtheclark commented 7 years ago

@jrwebdev: This PR looks fine to me. Can you please try merging in the latest version of master? I'm hoping that will fix this test failure you're seeing.

Bazman commented 7 years ago

Hi gents, this pull request looks ready to go. I'd be keen to see it merged :)

davidtheclark commented 7 years ago

Published in 1.1.0. Thanks @jackwilsdon!

Bazman commented 7 years ago

Awesome guys, thanks!