New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-hammerhead

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-hammerhead - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

4

lib/rules/proto-methods.js

@@ -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)';

2

package.json
{
"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 }]
}
]
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc