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

eslint-plugin-valtio

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-valtio - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

18

index.js

@@ -218,3 +218,3 @@ 'use strict';

if (kind === 'snapshot') {
if (isReadOnly(node) && isInHookDeps(node)) {
if (isReadOnly(node) && (isInHookDeps(node) || isInJSXContainer(node) || isInDeclaration(node))) {
return;

@@ -419,2 +419,18 @@ }

function isInJSXContainer(node) {
return isInSomething(node, 'JSXExpressionContainer') || isInSomething(node, 'JSXElement');
}
function isInDeclaration(node) {
var _parentDeclaration$in, _parentDeclaration$in2;
var _parentDeclaration = getParentOfNodeType(node, 'VariableDeclarator');
if ((_parentDeclaration == null ? void 0 : (_parentDeclaration$in = _parentDeclaration.init) == null ? void 0 : (_parentDeclaration$in2 = _parentDeclaration$in.callee) == null ? void 0 : _parentDeclaration$in2.name) === 'useSnapshot') {
return true;
}
return false;
}
var MESSAGE_THIS_IN_PROXY = "Avoid using `this` in valtio.proxy context.It might lead to unexpected results.\nUsing `this` is valid, but often a pitfall for beginners.";

@@ -421,0 +437,0 @@ var AvoidThisInProxy = {

2

package.json
{
"name": "eslint-plugin-valtio",
"private": false,
"version": "0.4.3",
"version": "0.4.4",
"description": "An eslint plugin for better valtio experience",

@@ -6,0 +6,0 @@ "main": "index.js",

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