eslint-plugin-hammerhead
Advanced tools
Comparing version 0.0.3 to 0.0.4
@@ -21,2 +21,5 @@ module.exports = function (context) { | ||
return context.report(node, module.exports.USING_ILLEGAL_ARRAY_FUNC_ERR_MSG.replace('%s', property.name)); | ||
if (property.name === 'bind') | ||
return context.report(node, module.exports.USING_BIND_FUNCTION_ERR_MSG); | ||
} | ||
@@ -29,1 +32,2 @@ } | ||
module.exports.USING_ILLEGAL_ARRAY_FUNC_ERR_MSG = 'Forbidden to use the "%s" function because it is slower than inline code and may be replaced by any framework (GH-245)'; | ||
module.exports.USING_BIND_FUNCTION_ERR_MSG = 'Forbidden to use the "bind" function because it is slower than "call" or "apply" (GH-359)'; |
{ | ||
"name": "eslint-plugin-hammerhead", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Specific rules for the hammerhead.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -59,4 +59,8 @@ 'use strict'; | ||
errors: [{ message: rule.USING_ILLEGAL_ARRAY_FUNC_ERR_MSG.replace('%s', 'reduceRight') }] | ||
}, | ||
{ | ||
code: 'func.bind(x)', | ||
errors: [{ message: rule.USING_BIND_FUNCTION_ERR_MSG }] | ||
} | ||
] | ||
}); |
5366
93