Skip to content

Commit d946e25

Browse files
committed
feat(no-invalid-state-props): add "output" as a valid prop on the root state
1 parent 5ccb82c commit d946e25

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const validProperties = {
5555

5656
function isValidStateProperty(property, version) {
5757
return (
58-
validRootProperties[version] &&
58+
validProperties[version] &&
5959
validProperties[version].includes(property.key.name)
6060
)
6161
}
@@ -100,6 +100,7 @@ const validRootProperties = {
100100
'target', // only when type=history
101101
'types',
102102
'type',
103+
'output',
103104
],
104105
}
105106
function isValidRootStateProperty(property, version) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ const tests = {
7171
types: {},
7272
entry: 'log',
7373
exit: 'log',
74+
output: { answer: 42 },
7475
states: {
7576
idle: {
7677
type: 'parallel',

0 commit comments

Comments
 (0)