-
-
Notifications
You must be signed in to change notification settings - Fork 977
Closed
Labels
help wantedis likely non-trival and help is wantedis likely non-trival and help is wantedstatus: ready to implementis ready to be worked on by someoneis ready to be worked on by someone
Description
What is the problem you're trying to solve?
I would like to inform developers better when their code fails linting.
Currently, I can provide a custom message but:
- This loses the ability to reference the value that caused the failure. For example:
- Before:
Unexpected hex color "#fff"
- After
Unexpected hex color. Please refer to the brand colours in the Styleguide
- Before:
- The blacklisted values are a great way to prevent developers from adding rules you would otherwise not want. However, it's not possible to do this:
...you can only add 1 catch-all message for all invalid property values.
'declaration-property-value-blacklist': { 'font-weight': ['500', { message: 'Please use the semi-bold mixin instead' }] },
What solution would you like to see?
-
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
ybiquitous, kwokrobyn1-zz, glen-84, tay1orjones, brunowego and 3 more
Metadata
Metadata
Assignees
Labels
help wantedis likely non-trival and help is wantedis likely non-trival and help is wantedstatus: ready to implementis ready to be worked on by someoneis ready to be worked on by someone