Socket
Socket
Sign inDemoInstall

eslint-plugin-react-hooks

Package Overview
Dependencies
Maintainers
6
Versions
1833
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-react-hooks - npm Package Compare versions

Comparing version 0.0.0-3694a3b5e to 0.0.0-38dd17ab9

8

build-info.json
{
"branch": "master",
"buildNumber": "48138",
"checksum": "d91410d",
"commit": "3694a3b5e",
"buildNumber": "57986",
"checksum": "7604c6f",
"commit": "38dd17ab9",
"environment": "ci",
"reactVersion": "16.9.0-canary-3694a3b5e"
"reactVersion": "16.11.0-38dd17ab9"
}

@@ -1,2 +0,2 @@

/** @license React v0.0.0-3694a3b5e
/** @license React v0.0.0-38dd17ab9
* eslint-plugin-react-hooks.production.min.js

@@ -28,3 +28,3 @@ *

h(D)*l(D),H=C.has(D.id);k=!0;t=!1;K=void 0;try{for(var w=M[Symbol.iterator](),N;!(k=(N=w.next()).done);k=!0){var r=N.value;H&&a.report({node:r,message:'React Hook "'+a.getSource(r)+'" may be executed more than once. Possibly because it is called in a loop. React Hooks must be called in the exact same order in every component render.'});if(x){if(!H&&T!==F){var U='React Hook "'+a.getSource(r)+'" is called conditionally. React Hooks must be called in the exact same order in every component render.'+
(J?" Did you accidentally call a React Hook after an early return?":"");a.report({node:r,message:U})}}else if(!d.parent||"MethodDefinition"!==d.parent.type&&"ClassProperty"!==d.parent.type||d.parent.value!==d)if(g){var O='React Hook "'+a.getSource(r)+'" is called in '+('function "'+a.getSource(g)+'" ')+"which is neither a React function component or a custom React Hook function.";a.report({node:r,message:O})}else if("Program"===d.type){var Q='React Hook "'+a.getSource(r)+'" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function.';
(J?" Did you accidentally call a React Hook after an early return?":"");a.report({node:r,message:U})}}else if(!d.parent||"MethodDefinition"!==d.parent.type&&"ClassProperty"!==d.parent.type||d.parent.value!==d)if(g){var O='React Hook "'+a.getSource(r)+'" is called in '+('function "'+a.getSource(g)+'" ')+"that is neither a React function component nor a custom React Hook function.";a.report({node:r,message:O})}else if("Program"===d.type){var Q='React Hook "'+a.getSource(r)+'" cannot be called at the top level. React Hooks must be called in a React function component or a custom React Hook function.';
a.report({node:r,message:Q})}else if(u){var q='React Hook "'+a.getSource(r)+'" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function.';a.report({node:r,message:q})}}}catch(G){t=!0,K=G}finally{try{k||null==w.return||w.return()}finally{if(t)throw K;}}}}}catch(G){p=!0,I=G}finally{try{m||null==y.return||y.return()}finally{if(p)throw I;}}}},CallExpression:function(a){if(S(a.callee)){var d=e[e.length-1],h=b[b.length-1],l=d.get(h);l||

@@ -31,0 +31,0 @@ (l=[],d.set(h,l));l.push(a.callee)}}}}},"exhaustive-deps":{meta:{fixable:"code",schema:[{type:"object",additionalProperties:!1,properties:{additionalHooks:{type:"string"}}}]},create:function(a){function e(a,d){return function(b){if(d.has(b))return d.get(b);var e=a(b);d.set(b,e);return e}}function b(b){function k(a){var c=!0,f=!1,d=void 0;try{for(var e=a.references[Symbol.iterator](),h;!(c=(h=e.next()).done);c=!0){var g=h.value;if(g.resolved&&I.has(g.resolved.scope)){var m=Y(b,g.identifier),l=fa(m),

{
"name": "eslint-plugin-react-hooks",
"description": "ESLint rules for React Hooks",
"version": "0.0.0-3694a3b5e",
"version": "0.0.0-38dd17ab9",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

Sorry, the diff of this file is too big to display

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