Skip to content

Commit

Permalink
feat(no-invalid-state-props): add "output" as a valid prop on the roo…
Browse files Browse the repository at this point in the history
…t state
  • Loading branch information
rlaffers committed Oct 18, 2023
1 parent 5ccb82c commit d946e25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rules/no-invalid-state-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const validProperties = {

function isValidStateProperty(property, version) {
return (
validRootProperties[version] &&
validProperties[version] &&
validProperties[version].includes(property.key.name)
)
}
Expand Down Expand Up @@ -100,6 +100,7 @@ const validRootProperties = {
'target', // only when type=history
'types',
'type',
'output',
],
}
function isValidRootStateProperty(property, version) {
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/no-invalid-state-props.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const tests = {
types: {},
entry: 'log',
exit: 'log',
output: { answer: 42 },
states: {
idle: {
type: 'parallel',
Expand Down

0 comments on commit d946e25

Please sign in to comment.