storybookjs / eslint-plugin-storybook

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

await-interactions rule not working, but others do (from 'plugin:storybook/recommended') #153

Open paroxyzm opened 2 months ago

paroxyzm commented 2 months ago

Describe the bug Enabling the plugin makes some rules work, except await-interactions

To Reproduce [use reproduce repo]

  1. Install the plugin following docs
  2. enable the plugin in .eslintrc.js extends: ['plugin:@nx/react', 'plugin:storybook/recommended'],
  3. Tweak the eslint overrides to see if any rules apply - they do (except await-interactions), see screenshots
    {
    "overrides": [
    {"rules": {
        'storybook/hierarchy-separator': 'error',
        'storybook/await-interactions': 'error',

I was able to do semi-debugging locally, and when I remove the if condition in 'Program:exit' call, the plugin works as expected.

Expected behavior Missing awaits should be marked by eslint

Screenshots Proof that the recommended plugins are working at least partially for hierarchy-separator

image

Local tweaking: (in node_modules/await-interactions.js)

image

Plugin works after local tweaking:

image

Any ideas on how to resolve/further debug the issue would be appreciated!

Thank you!