Skip to content
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

Lint for disallowed imports #175

Merged
merged 4 commits into from Sep 15, 2021
Merged

Lint for disallowed imports #175

merged 4 commits into from Sep 15, 2021

Conversation

brandones
Copy link
Collaborator

@brandones brandones commented Aug 25, 2021

Produces errors like

Screenshot from 2021-08-25 08-47-18

Copy link
Contributor

@FlorianRappl FlorianRappl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great - should we also include things like carbon icons, lodash-es (only submodules should be considered), etc.?

@brandones
Copy link
Collaborator Author

Yeah, those are good ones, thanks

@brandones
Copy link
Collaborator Author

brandones commented Aug 25, 2021

Oops, looks like we'll need typescript-eslint/typescript-eslint#2661 fixed. By great coincidence, a PR was submitted 4 days ago: typescript-eslint/typescript-eslint#3775 . Fingers crossed it goes in soon. This PR should be considered blocked on it. I'll close this PR if that PR closes or stalls out.

@brandones
Copy link
Collaborator Author

Since carbon-react-components now tree-shakes well, we no longer need typescript-eslint/typescript-eslint#2661 fixed. The rule has been updated to forbid imports from carbon-components-react/lib, which does not tree-shake well.

@brandones brandones merged commit 96f2e30 into master Sep 15, 2021
@brandones brandones deleted the eslint-import-rules branch September 15, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants