Skip to content

Fix optional Storybook ESLint plugin loading#74

Open
modelsbridgeaicom-ship-it wants to merge 1 commit into
brazostech:mainfrom
modelsbridgeaicom-ship-it:fix-optional-storybook-eslint
Open

Fix optional Storybook ESLint plugin loading#74
modelsbridgeaicom-ship-it wants to merge 1 commit into
brazostech:mainfrom
modelsbridgeaicom-ship-it:fix-optional-storybook-eslint

Conversation

@modelsbridgeaicom-ship-it

Copy link
Copy Markdown

Summary

  • Load eslint-plugin-storybook with a guarded dynamic import.
  • Keep Storybook's recommended flat config active whenever the plugin is installed.
  • Skip only the Storybook ESLint rules when the plugin package is missing, so eslint . can still lint the rest of the project.

Fixes #47

Validation

  • npm install --ignore-scripts --no-audit --no-fund
  • npm run lint
  • Temporarily moved node_modules/eslint-plugin-storybook out of node_modules, then ran npm run lint again to verify ESLint no longer crashes when the plugin is absent.
  • Restored the plugin directory and ran npm run build.
  • git diff --check -- eslint.config.js

@netlify

netlify Bot commented Jun 7, 2026

Copy link
Copy Markdown

Deploy Preview for cscsdev ready!

Name Link
🔨 Latest commit e4d647c
🔍 Latest deploy log https://app.netlify.com/projects/cscsdev/deploys/6a258e4ad7c2440008bbdba3
😎 Deploy Preview https://deploy-preview-74--cscsdev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESLint crashes when eslint-plugin-storybook is not installed

1 participant