eslint-plugin-xstate
Advanced tools
Comparing version 0.11.0 to 0.12.0
@@ -20,3 +20,2 @@ /** | ||
'no-imperative-action': require('./rules/no-imperative-action'), | ||
'no-root-ondone': require('./rules/no-root-ondone'), | ||
'no-ondone-outside-compound-state': require('./rules/no-ondone-outside-compound-state'), | ||
@@ -29,2 +28,3 @@ 'invoke-usage': require('./rules/invoke-usage'), | ||
'no-invalid-transition-props': require('./rules/no-invalid-transition-props'), | ||
'no-invalid-state-props': require('./rules/no-invalid-state-props'), | ||
'no-async-guard': require('./rules/no-async-guard'), | ||
@@ -39,3 +39,2 @@ }, | ||
'xstate/no-imperative-action': 'error', | ||
'xstate/no-root-ondone': 'error', | ||
'xstate/no-ondone-outside-compound-state': 'error', | ||
@@ -47,2 +46,3 @@ 'xstate/invoke-usage': 'error', | ||
'xstate/no-invalid-transition-props': 'error', | ||
'xstate/no-invalid-state-props': 'error', | ||
'xstate/no-async-guard': 'error', | ||
@@ -57,3 +57,2 @@ }, | ||
'xstate/no-imperative-action': 'error', | ||
'xstate/no-root-ondone': 'error', | ||
'xstate/no-ondone-outside-compound-state': 'error', | ||
@@ -69,2 +68,3 @@ 'xstate/invoke-usage': 'error', | ||
'xstate/no-invalid-transition-props': 'error', | ||
'xstate/no-invalid-state-props': 'error', | ||
'xstate/no-async-guard': 'error', | ||
@@ -71,0 +71,0 @@ }, |
@@ -10,2 +10,6 @@ const { allPass, complement } = require('./combinators') | ||
const propertyHasName = (propName) => (node) => node.key.name === propName | ||
// matches only literal values (string, number, boolean, null) | ||
const propertyHasValue = (value) => (node) => | ||
node.value.type === 'Literal' && node.value.value === value | ||
const propertyValueIsNil = (node) => | ||
@@ -134,2 +138,3 @@ (node.type === 'Literal' && node.value.value === undefined) || | ||
propertyHasName, | ||
propertyHasValue, | ||
hasProperty, | ||
@@ -136,0 +141,0 @@ isFunctionExpression, |
{ | ||
"name": "eslint-plugin-xstate", | ||
"version": "0.11.0", | ||
"version": "0.12.0", | ||
"description": "ESLint rules for XState", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -41,3 +41,2 @@ # eslint-plugin-xstate | ||
"xstate/no-imperative-action": "error", | ||
"xstate/no-root-ondone": "error", | ||
"xstate/no-ondone-outside-compound-state": "error", | ||
@@ -49,2 +48,3 @@ "xstate/invoke-usage": "error", | ||
"xstate/no-invalid-transition-props": "error", | ||
"xstate/no-invalid-state-props": "error", | ||
"xstate/no-async-guard": "error", | ||
@@ -86,3 +86,2 @@ "xstate/event-names": ["warn", "macroCase"], | ||
| [no-imperative-action](docs/rules/no-imperative-action.md) | Forbid using action creators imperatively | :heavy_check_mark: | | ||
| [no-root-ondone](docs/rules/no-root-ondone.md) | Forbid onDone transitions on root nodes | :heavy_check_mark: | | ||
| [no-ondone-outside-compound-state](docs/rules/no-ondone-outside-compound-state.md) | Forbid onDone transitions on `atomic`, `history` and `final` nodes | :heavy_check_mark: | | ||
@@ -93,2 +92,3 @@ | [invoke-usage](docs/rules/invoke-usage.md) | Enforce correct invocation of services | :heavy_check_mark: | | ||
| [no-invalid-transition-props](docs/rules/no-invalid-transition-props.md) | Forbid invalid properties in transition declarations | :heavy_check_mark: | | ||
| [no-invalid-state-props](docs/rules/no-invalid-state-props.md) | Forbid invalid properties in state node declarations | :heavy_check_mark: | | ||
| [no-async-guard](docs/rules/no-async-guard.md) | Forbid asynchronous guard functions | :heavy_check_mark: | | ||
@@ -95,0 +95,0 @@ |
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
73337
1901