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

Update scss/at-mixin-pattern #181

Closed
Schascha opened this issue May 19, 2021 · 3 comments · Fixed by #279
Closed

Update scss/at-mixin-pattern #181

Schascha opened this issue May 19, 2021 · 3 comments · Fixed by #279

Comments

@Schascha
Copy link

Schascha commented May 19, 2021

Hello,

"scss/at-mixin-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",

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

@kerryj89
Copy link

kerryj89 commented Jul 11, 2021

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

@bjankord bjankord added this to the v10.0.0 milestone Oct 30, 2021
@bjankord
Copy link
Owner

I'm open to updating this.

@bjankord bjankord removed this from the v10.0.0 milestone Mar 14, 2023
@bjankord
Copy link
Owner

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.

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.

3 participants