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.13.1 to 0.14.0

40

lib/rules/no-invalid-state-props.js

@@ -8,3 +8,3 @@ 'use strict'

isObjectExpression,
hasProperty,
hasProperty
} = require('../utils/predicates')

@@ -30,2 +30,3 @@ const { allPass } = require('../utils/combinators')

'data',
'description'
]

@@ -52,2 +53,3 @@ function isValidStateProperty(property) {

'preserveActionOrder',
'description'
]

@@ -97,4 +99,4 @@ function isValidRootStateProperty(property) {

value:
prop.value.type === 'Literal' ? prop.value.value : prop.value.type,
},
prop.value.type === 'Literal' ? prop.value.value : prop.value.type
}
})

@@ -113,4 +115,4 @@ return false

value:
prop.value.type === 'Literal' ? prop.value.value : prop.value.type,
},
prop.value.type === 'Literal' ? prop.value.value : prop.value.type
}
})

@@ -135,3 +137,3 @@ return false

url: getDocsUrl('no-invalid-state-props'),
recommended: true,
recommended: true
},

@@ -153,4 +155,4 @@ schema: [],

initialAllowedOnlyOnCompoundNodes:
'The "initial" property can be declared on compound state nodes only.',
},
'The "initial" property can be declared on compound state nodes only.'
}
},

@@ -163,3 +165,3 @@

const isCompoundStateNode = isCompoundState(node)
node.properties.forEach((prop) => {
node.properties.forEach(prop => {
if (

@@ -172,3 +174,3 @@ !isHistoryNode &&

messageId: 'propAllowedOnHistoryStateOnly',
data: { propName: prop.key.name },
data: { propName: prop.key.name }
})

@@ -181,3 +183,3 @@ return

node: prop,
messageId: 'contextAllowedOnlyOnRootNodes',
messageId: 'contextAllowedOnlyOnRootNodes'
})

@@ -190,3 +192,3 @@ return

node: prop,
messageId: 'initialAllowedOnlyOnCompoundNodes',
messageId: 'initialAllowedOnlyOnCompoundNodes'
})

@@ -200,3 +202,3 @@ return

messageId: 'invalidStateProperty',
data: { propName: prop.key.name },
data: { propName: prop.key.name }
})

@@ -217,3 +219,3 @@ return

const isCompoundStateNode = isCompoundState(node)
node.properties.forEach((prop) => {
node.properties.forEach(prop => {
if (

@@ -226,3 +228,3 @@ !isHistoryNode &&

messageId: 'propAllowedOnHistoryStateOnly',
data: { propName: prop.key.name },
data: { propName: prop.key.name }
})

@@ -235,3 +237,3 @@ return

node: prop,
messageId: 'initialAllowedOnlyOnCompoundNodes',
messageId: 'initialAllowedOnlyOnCompoundNodes'
})

@@ -245,3 +247,3 @@ return

messageId: 'invalidRootStateProperty',
data: { propName: prop.key.name },
data: { propName: prop.key.name }
})

@@ -257,5 +259,5 @@ return

})
},
}
}
},
}
}
{
"name": "eslint-plugin-xstate",
"version": "0.13.1",
"version": "0.14.0",
"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