Update scss/at-mixin-pattern
Schascha opened this issue · comments
Hello,
stylelint-config-sass-guidelines/index.js
Line 85 in ffa15c4
maybe prefer this regex:
"scss/at-mixin-pattern": "^[a-z]+(-?[a-z0-9]+)+$"
With that way mixins like h1()
are possible and we can prevent mixins with multiple -
like foo--bar()
.
Thanks
I feel like with the popularity of BEM maybe double hyphens shouldn't be prevented by default ^[a-z][0-9]?(-{0,2}[a-z0-9]+)*$
, but I guess the pattern starts to look too opinionated.
Agreed that the pattern should be updated; funny enough I ran into the same issue with my math variables $x1, $x2, etc. #191
I'm open to updating this.
Thinking about this, I don't feel strongly about enforcing a strict regex for mixins. Planning to remove the scss/at-mixin-pattern rule in the next major (v10) release and then people can decide however they want to write their mixins.