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

Add message arguments to function-disallowed-list #6455

Closed
glen-84 opened this issue Nov 6, 2022 · 1 comment · Fixed by #6463
Closed

Add message arguments to function-disallowed-list #6455

glen-84 opened this issue Nov 6, 2022 · 1 comment · Fixed by #6463
Labels
status: ready to implement is ready to be worked on by someone type: enhancement a new feature that isn't related to rules

Comments

@glen-84
Copy link
Contributor

glen-84 commented Nov 6, 2022

What is the problem you're trying to solve?

Setting a custom message for the function-disallowed-list rule.

What solution would you like to see?

"function-disallowed-list": [
    ["rgb", "rgba"],
    {
        message: (functionNameOrRegex) => {
            switch (functionNameOrRegex) {
                case "rgb":
                case "rgba":
                    return "Use HSL colours";
            }
        }
    }
]
@ybiquitous ybiquitous added the status: ready to implement is ready to be worked on by someone label Nov 7, 2022
@ybiquitous
Copy link
Member

@glen-84 Thanks for the proposal. See also #6453 (comment).

I've labeled the issue as ready to implement. Please consider contributing if you have time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready to implement is ready to be worked on by someone type: enhancement a new feature that isn't related to rules
Development

Successfully merging a pull request may close this issue.

2 participants