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 experimental support for custom message arguments #6312
Changes from all commits
f0ca0a6
4734421
eddbb4b
9d1ef44
4b11c6a
2cd9ae0
3eb141f
9d8e693
a38c74b
fb47cf7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"stylelint": minor | ||
--- | ||
|
||
Added: experimental support for custom message arguments |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,7 +42,8 @@ const rule = (primary) => { | |
const endIndex = index + node.value.length; | ||
|
||
report({ | ||
message: messages.rejected(node.value), | ||
message: messages.rejected, | ||
messageArgs: [node.value], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remark If I understand correctly, the order will be arbitrary. i.e.
related There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Mouvedia Thanks for the share. Other problems might be found than you pointed out, but this feature is still experimental. We would try considering it based on reactions or feedback later. |
||
node: decl, | ||
index, | ||
endIndex, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[note] Unless the disabling comment, Prettier would format the snippet like this:
Compared to the snippet above for
.stylelintrc.js
, it would not be easier to read.