-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Add eslint-plugin-storybook to automigrate #16550
Conversation
Nx Cloud ReportCI ran the following commands for commit 1df03aa. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment
7d3b4e5
to
81923fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chef's kiss 😽
@shilman I think this is good to go. I don't think this caused the failures in the E2E, have you seen these failures elsewhere? |
Issue: N/A
What I did
This PR adds a new automigration step: eslint-plugin.
It will:
1 - Check if the user has
eslint
but does not haveeslint-plugin-storybook
2 - If that is the case, it will check if the
.eslintrc
file of the user is supported (js or cjs)3 - It will install the
eslint-plugin-storybook
dependency4.1 - After that, if the eslintrc is supported, it will write the configuration in the eslint file.
4.2 If the eslintrc file is unsupported (json, yml, yaml), it will log a warning with instructions to install manually (but successfully install the dependency)
What this depends on
The eslint plugin is not ready, so this should not be merged until it is published.
How to test
1 - go to examples/official-storybook
2 - add eslint in package.json
3 - add a .eslintrc.js file in examples/official-storybook:
4 - run
yarn build cli
5 - run
../../lib/cli/bin/index.js automigrate