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
Add function-name-arguments-whitelist #4727
Comments
@mockey-jockey Thanks for the report and for using the template. The rule checks the scheme of the URL. From the docs:
i.e, the scheme is the thing up to the It's not the right rule for the job, but your use case is valid and I think we can add a new rule to stylelint for it. Unless there are any objections, I think we can add a
The rule would be very similar to declaration-property-value-whitelist but would target function name and arguments rather than properties and values. |
Thanks, @jeddy3 sounds good. Please let me know once done. |
As there are no objections to this rule, I'll label it up as good-to-go.
I've labelled the issue as ready to implement. Please consider contributing if you have time, @mockey-jockey. stylelint is an open-source volunteer project, and it's unlikely the rule will be added unless you contribute it yourself. There are steps on how to add a new rule in the Developer guide. I suggest using declaration-property-value-whitelist as a blueprint, and then using postcss-value-parser to find and check functions within values. |
hey Richard Hallows,
I would like to create Draft PR, But i could not push the code
facing this issue
[image: image.png]
did i missed something?
can u pls help me on this
thanks
Mani Tamilarasan
…On Sun, May 10, 2020 at 9:11 PM Richard Hallows ***@***.***> wrote:
As there are no objections to this rule, I'll label it up as good-to-go.
- Name: function-name-arguments-whitelist
- Primary option: object: { "unprefixed-function-name": ["string",
"/regex/", /regex/] }
- Secondary options: None
- Message: Unexpected arguments "${arguments}" for function
"${function}"
- Description: "Specify a whitelist of allowed name and arguments
pairs for functions."
- Extended description: None
- Section: "Limit language features" -> "Function"
<https://stylelint.io/user-guide/rules/list#function-1>
Please let me know once done.
I've labelled the issue as ready to implement. Please consider
contributing <https://stylelint.io/contributing> if you have time,
@mockey-jockey <https://github.com/mockey-jockey>. stylelint is an
open-source volunteer project, and it's unlikely the rule will be added
unless you contribute it yourself.
There are steps on how to add a new rule
<https://stylelint.io/developer-guide/rules#add-a-rule> in the Developer
guide. I suggest using declaration-property-value-whitelist
<https://stylelint.io/user-guide/rules/declaration-property-value-whitelist>
as a blueprint, and then using postcss-value-parser to find and check
functions within values.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4727 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AIWJGUW33HB76FOGR4US76TRQ3DLPANCNFSM4MTXVGWQ>
.
--
**The content of this e-mail is confidential and is intended solely for the
use of the individual or entity to whom it is addressed. If you have
received this e-mail by mistake, please reply to this e-mail and follow
with its deletion. If you are not the intended recipient, please note that
it shall be considered unlawful to copy, forward or in any manner reveal
the contents of this e-mail or any part thereof to anyone. Although
Freshworks has taken reasonable precautions to ensure no malware is present
in this e-mail, Freshworks cannot accept responsibility for any loss or
damage arising from the use of this e-mail or attachments.**
|
@mockey-jockey you need to fork repository, and push to your fork. Then create a draft PR to this repository. |
#4816 am created draft PR, could some help me to am going correct path or not. sorry am new to open source contributor that's what little bit worried how am doing good or not like that |
It was decided in #4816 that this use case is best handled in a userland plugin. Closing the issue. |
Am trying to add the rule for the background-image URL should start with images
background-image: url(ssasimages/dummy.svg);
"function-url-scheme-whitelist": "/^images/",
9.2.0
stylelint app/styles
"Yes, it's related to SCSS nested properties."
"No warnings to be flagged."
"The following warnings were flagged:"
The text was updated successfully, but these errors were encountered: