storybookjs / eslint-plugin-storybook

🎗Official ESLint plugin for Storybook
MIT License
238 stars 42 forks source link

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

Open quangv opened 6 months ago

quangv commented 6 months ago

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

Additional context

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

Thanks!