diff --git a/lib/rules/button-has-type.js b/lib/rules/button-has-type.js index a42e0f685f..2322a092a2 100644 --- a/lib/rules/button-has-type.js +++ b/lib/rules/button-has-type.js @@ -71,16 +71,17 @@ module.exports = { }); } - function checkValue(node, value, quote = x => `"${x}"`) { + function checkValue(node, value, quoteFn) { + const q = quoteFn || (x => `"${x}"`); if (!(value in configuration)) { context.report({ node: node, - message: `${quote(value)} is an invalid value for button type attribute` + message: `${q(value)} is an invalid value for button type attribute` }); } else if (!configuration[value]) { context.report({ node: node, - message: `${quote(value)} is a forbidden value for button type attribute` + message: `${q(value)} is a forbidden value for button type attribute` }); } }