eslint-plugin-storybook icon indicating copy to clipboard operation
eslint-plugin-storybook copied to clipboard

context-in-play-function in `step` lints incorrectly

Open quangv opened this issue 1 year ago • 0 comments

Describe the bug

Within a step function, when I invoke a play function from another story, and pass full context as an argument, the linter complains with context-in-play-function

To Reproduce

    await Default.play?.(context);  // works fine
    
    await step('In step', async () => {
          await Default.play?.(context);  // has lint errors
    })

Expected behavior

  • no lint errors
  • OR a message that says we shouldn't play other functions within a step.

Additional context

Please do let me know of we shouldn't play other functions within a step.

Thanks!

quangv avatar Dec 20 '23 18:12 quangv