Skip to content

Conversation

@Janther
Copy link
Contributor

@Janther Janther commented Jun 23, 2025

by looking at openzeppelin's long imports I noticed that forcing to break a single deconstructed import into multiple lines, only makes the file longer and the most important part is the imported object.

This makes files with multiple imports where some of them break and some don't a bit confusing to read. That's why I think we could review the import rule so only deconstructions longer than one item will break.

This will force the openzeppelin-contracts package to re-write some of the contracts that were just updated when they upgraded to [email protected] because of this reason, which is undesirable but I believe is an important tweak.

@Janther Janther requested a review from fvictorio June 23, 2025 21:47
@Janther Janther added the format Addresses a change in the format label Jun 28, 2025
Copy link
Member

@fvictorio fvictorio left a comment

Choose a reason for hiding this comment

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

I was on the fence about this change, but apparently Prettier core does the same, so yeah, let's do it.

@Janther Janther merged commit 90fa4c0 into main Jul 9, 2025
7 checks passed
@Janther Janther deleted the import-review branch July 9, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

format Addresses a change in the format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants