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

[Request] ignore some function names for at-function-named-arguments #242

Closed
chimericdream opened this issue Apr 27, 2018 · 7 comments
Closed
Labels
Enhancement ✨ New feature or request

Comments

@chimericdream
Copy link

I'd like to require named arguments for most function calls, but exclude things like map-merge(). Would it be possible to add this as an optional secondary rule?

@kristerkari kristerkari added the Enhancement ✨ New feature or request label Apr 28, 2018
@kristerkari
Copy link
Collaborator

Yes, definitely.

@iamnewton
Copy link

iamnewton commented Aug 4, 2018

On the same vein here, how would you deal with things like, where it appears to see the string inside the url() function has having the : (colon) but no variable declaration in front of it. I'd expect it to choke on url($data: ...), not when its a string.

str-replace(url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='592' height='90' viewBox='0 0 592 90'%3E%3Cpath fill='#{$placeholder-color}' fill-rule='evenodd' d='M3 0h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3zm0 60h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3H3a3 3 0 0 1-3-3V63a3 3 0 0 1 3-3zM167 0h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3h-94a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3zm0 60h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3h-94a3 3 0 0 1-3-3V63a3 3 0 0 1 3-3zM331 0h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3h-94a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3zm0 60h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3h-94a3 3 0 0 1-3-3V63a3 3 0 0 1 3-3zM495 0h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3h-94a3 3 0 0 1-3-3V3a3 3 0 0 1 3-3zm0 60h94a3 3 0 0 1 3 3v24a3 3 0 0 1-3 3h-94a3 3 0 0 1-3-3V63a3 3 0 0 1 3-3z'/%3E%3C/svg%3E"), "#", "%23");

@kristerkari
Copy link
Collaborator

@chrisopedia That looks like a bug to me. I'll investigate

@kristerkari
Copy link
Collaborator

Just to give an update, I have verified the bug and I'm working on a fix. It's a bit tricky to fix tho because of the hacky way of how the rule is parsing function parameters currently.

@kristerkari
Copy link
Collaborator

@chrisopedia Here's the pull request with a fix: #267

I'll release a new version after that gets merged.

@kristerkari
Copy link
Collaborator

@chimericdream I have implemented an option called ignoreFunctions. It will be included in the next release: #269

@kristerkari
Copy link
Collaborator

Both things are included in the latest release:
https://github.com/kristerkari/stylelint-scss/releases/tag/3.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ New feature or request
Development

No branches or pull requests

3 participants