chore: Sort all imports and activate eslint import rule by jdeniau · Pull Request #2119 · immutable-js/immutable-js

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.