eslint-plugin-xstate
Advanced tools
Comparing version 0.13.1 to 0.14.0
@@ -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": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73562
1914