We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
button-has-type
1 parent 4f2ef17 commit 8ecc53fCopy full SHA for 8ecc53f
lib/rules/button-has-type.js
@@ -71,16 +71,17 @@ module.exports = {
71
});
72
}
73
74
- function checkValue(node, value, quote = x => `"${x}"`) {
+ function checkValue(node, value, quoteFn) {
75
+ const q = quoteFn || (x => `"${x}"`);
76
if (!(value in configuration)) {
77
context.report({
78
node: node,
- message: `${quote(value)} is an invalid value for button type attribute`
79
+ message: `${q(value)} is an invalid value for button type attribute`
80
81
} else if (!configuration[value]) {
82
83
- message: `${quote(value)} is a forbidden value for button type attribute`
84
+ message: `${q(value)} is a forbidden value for button type attribute`
85
86
87
0 commit comments