Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-plugin-xstate

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-plugin-xstate - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

23

lib/rules/no-imperative-action.js

@@ -24,2 +24,17 @@ 'use strict'

function isPureActionCall(node) {
return node.type === 'CallExpression' && node.callee.name === 'pure'
}
function isWithinPureActionCreator(node) {
let parent = node.parent
while (parent) {
if (isPureActionCall(parent)) {
return true
}
parent = parent.parent
}
return false
}
module.exports = {

@@ -47,3 +62,3 @@ meta: {

) {
if (isActionCreatorCall(node)) {
if (isActionCreatorCall(node) && !isWithinPureActionCreator(node)) {
context.report({

@@ -60,3 +75,3 @@ node,

) {
if (isActionCreatorCall(node)) {
if (isActionCreatorCall(node) && !isWithinPureActionCreator(node)) {
context.report({

@@ -73,3 +88,3 @@ node,

) {
if (isActionCreatorCall(node)) {
if (isActionCreatorCall(node) && !isWithinPureActionCreator(node)) {
context.report({

@@ -86,3 +101,3 @@ node,

) {
if (isActionCreatorCall(node)) {
if (isActionCreatorCall(node) && !isWithinPureActionCreator(node)) {
context.report({

@@ -89,0 +104,0 @@ node,

2

package.json
{
"name": "eslint-plugin-xstate",
"version": "0.0.6",
"version": "0.0.7",
"description": "ESLint rules for XState",

@@ -5,0 +5,0 @@ "keywords": [

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