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 support for functional custom messages #4117
Comments
This are two different suggestions.
|
Ok thanks for the info. Would it be possible to make 'declaration-property-value-blacklist': [{
'font-weight': ['500']
}, {
message: function(prop, value) {}
}], Then the onus is on me to do the work, not Stylelint Mind you, that gets us into custom formatter territory. |
Any updates on this? I noticed it was closed, but did not see any changes being made |
@amk221 Can you please reopen this issue? Not being able to specify a custom message for a blacklisted property value is a problem. |
I also would like to be able to provide a custom message while still having the value, which caused the failure, reported, as stated by @amk221 for issue 1 in the original post. |
I would like to implement this, as I’m considering developing a plugin where each rule would simply be using stylelint’s I’m wondering which rules exactly this should be implemented for (assuming other ones would benefit from this, not just |
I've created PR #6312 as a PoC. |
I would like to inform developers better when their code fails linting.
Currently, I can provide a custom message but:
Unexpected hex color "#fff"
Unexpected hex color. Please refer to the brand colours in the Styleguide
It would be great to be able to swap-in values
${hex}
or, at least prefix/suffix the original error to the custom message.
It would be nice if the custom messages were acknowledged for each invalid property
The text was updated successfully, but these errors were encountered: