ESLint-plugin: Fix csf-strict extends resolution after bundling#34750
ESLint-plugin: Fix csf-strict extends resolution after bundling#34750ShebangDog wants to merge 2 commits into
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe PR updates ESLint plugin configuration extends references from relative file paths to plugin notation format. The config file csf-strict.ts and the generator script update-lib-configs.ts both switch to using ChangesESLint Plugin Config Extends Format
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #
What I did
The
csf-strictconfig was using a relative path (./configs/csf) to extend thecsfconfig. This path is relative to the source directory structure, but after bundling the file ends up at the package root — causing the extends resolution to fail at runtime.Changed the extends path to use the plugin format (
plugin:storybook/csf), which resolves correctly regardless of where the bundled file is located.scripts/update-lib-configs.ts: Fixed the template that generates legacy configssrc/configs/csf-strict.ts: Applied the fix viayarn update-rulesChecklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
Caution
This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!
Tested with a local project (csf-plugin-demo) that uses
plugin:storybook/csf-strict:Confirmation steps
npm run lint→ fails (cannot resolve./configs/csf)yalc publishto publish the fixed package locallyyalc add eslint-plugin-storybook@10.4.0-alpha.17to install the fixed versionnpm run lint→ succeedsError
Error in Confirmation steps 1
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake sure this PR contains one of the labels below:
Available labels
bug: Internal changes that fixes incorrect behavior.maintenance: User-facing maintenance tasks.dependencies: Upgrading (sometimes downgrading) dependencies.build: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup: Minor cleanup style change. Will not show up in release changelog.documentation: Documentation only changes. Will not show up in release changelog.feature request: Introducing a new feature.BREAKING CHANGE: Changes that break compatibility in some way with current major version.other: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/coreteam here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>Summary by CodeRabbit