-
Notifications
You must be signed in to change notification settings - Fork 116
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
fix: eslint and peer deps #2838
Conversation
|
✅ Deploy Preview for paste-theme-designer ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for paste-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit e26000e:
|
Size Change: -7.99 kB (-1%) Total Size: 859 kB
ℹ️ View Unchanged
|
89edbfe
to
5e3bf64
Compare
e26000e
to
4ffece2
Compare
4ffece2
to
3a19d78
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.
Plenty of good fixes in here.
Changes to eslint and how it runs, so that we can correctly identify missing internal packages, and lint otherwise un-linted projects in the monorepo.
Changes in this PR:
Eslint Configs
Right now we are unable to detect missing peer dependencies via eslint and the
no-extraneous-dependencies
rule because of the way we give eslint a cache of where the packages live for the gloabl root linting of Storybook and Jest files.Internal pacakges are not installed in the repo. So when linting a story which is global to the monorepo, it can't find button as an installed package. So we patch it and tell eslint where it lives.
Problem with that config was that when you are linting a package src, the internal packages are always found as they were globally patched to the file path. Hence we never caught any.
This config change splits the configs into packages and repo. We keep the patch cache for global or root files like Storybook, but remove it for packages, so that eslit looks at the local package json file when linting a component package.
Linting
This change also opened up the ability to lint each type of project on their own. We now lint:
This makes sure previously unlinted files, are now correctly linted via the Twilio Style Eslint Configs (hence all the files changes)
Things to fix
Checklist
required
checks have passed🕵🏻♀️ Run website visual regression
label