Skip to content

chore: Sort all imports and activate eslint import rule #2119

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

Merged
merged 3 commits into from
Jun 11, 2025
Merged

Conversation

jdeniau
Copy link
Member

@jdeniau jdeniau commented Jun 1, 2025

This may help reviewing #2105

@jdeniau jdeniau changed the title Use eslint to sort imports chore: Use eslint to sort imports Jun 1, 2025
@jdeniau jdeniau force-pushed the sort-imports branch 2 times, most recently from 7913d17 to cd0fbad Compare June 11, 2025 22:05
@jdeniau
Copy link
Member Author

jdeniau commented Jun 11, 2025

The diff did change as the import order did change.

It SHOULD be safe though to push that on main as the import order should not impact end user.

I ran copilot on that one to see if there is a side effect on the src dir, and here is the result:

After searching and scanning the entire src directory for side effects, here are the findings:

No files in src directly reference or mutate global objects like globalThis, window, self, or global.
No files in src use setTimeout, setInterval, eval, or similar APIs that would cause top-level side effects.
The only use of Object.defineProperty is in Record.js and Hash.js, but these are used to define properties on objects or prototypes, not on global objects. This is a standard, side-effect-free pattern unless the prototype is a global object (which it is not in this context).
No files in src use require or import() in a way that would cause dynamic side effects.
The only console usage in Record.js is for warnings, which is not a side effect that would impact library consumers.
No evidence of IIFEs, singletons, or top-level code that mutates global state.
Conclusion:
The code in the src directory does not contain side effects that would be affected by the order of import statements in your entry file. Sorting imports in Immutable.js is safe and will not impact end users.

@jdeniau jdeniau changed the title chore: Use eslint to sort imports chore: Sort all imports and activate eslint import rule Jun 11, 2025
@jdeniau jdeniau merged commit b3dee51 into main Jun 11, 2025
5 of 6 checks passed
@jdeniau jdeniau deleted the sort-imports branch June 11, 2025 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant