rlaffers / eslint-plugin-xstate

ESLint plugin to check for common mistakes and enforce good practices when using XState.
MIT License
48 stars 4 forks source link

False positive xstate/invoke-usage when invoke is an array #5

Closed VanTanev closed 2 years ago

VanTanev commented 2 years ago

Describe the bug xstate/invoke-usage provides false positives when invoke is an array

Expected behavior xstate/invoke-usage should handle array invoke definitions

Actual behavior

const machine = createMachine({
  // eslint error: [eslint xstate/invoke-usage] [E] The value of the "invoke" property must be an object with a "src" property.
  invoke: [{
    src: () => () => {}
  }],
});

Versions (please complete the following information):

rlaffers commented 2 years ago

:tada: This issue has been resolved in version 0.12.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: