Skip to content

fix: allow sorting and mutating arrays due perf + bump lockfile - #434

Merged
evenstensberg merged 2 commits into
mainfrom
ci
Aug 30, 2026
Merged

fix: allow sorting and mutating arrays due perf + bump lockfile#434
evenstensberg merged 2 commits into
mainfrom
ci

Conversation

@evenstensberg

@evenstensberg evenstensberg commented Aug 30, 2026

Copy link
Copy Markdown
Member

Summary

Allows using Array.sort in eslint, could be replaced by array.toSorted, but it will impact perf. Updated lockfile too.

What kind of change does this PR introduce?

fix

Did you add tests for your changes?

N/A

Does this PR introduce a breaking change?

No

If relevant, what needs to be documented once your changes are merged or what have you already documented?

N/A

Use of AI

Claude helped with implementation.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.38%. Comparing base (03e9d08) to head (24d305f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #434   +/-   ##
=======================================
  Coverage   93.38%   93.38%           
=======================================
  Files           1        1           
  Lines         121      121           
  Branches       48       47    -1     
=======================================
  Hits          113      113           
  Misses          7        7           
  Partials        1        1           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedserialize-javascript@​7.0.3 ⏵ 7.1.1100100 +210092 +2100

View full report

@evenstensberg evenstensberg changed the title fix: allow sorting and mutating arrays due perf fix: allow sorting and mutating arrays due perf + bump lockfile Aug 30, 2026
@evenstensberg
evenstensberg merged commit b47683c into main Aug 30, 2026
19 checks passed
@evenstensberg
evenstensberg deleted the ci branch August 30, 2026 11:19
Comment thread eslint.config.mjs
extends: [configs["recommended-dirty"]],
rules: {
"unicorn/no-array-sort": "off",
},

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should not do it, we should fix it, eslint rules should be not suppressed, that they rules without the real problems

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can use toSorted instead but it will impact performance, so that's why this is a lint change instead

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How it impacts performance?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We use it in many places

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

toSorted created a copy instead of modifying/mutating the array, so more memory will be used.

https://dev.to/sundarbadagala081/sort-vs-tosorted-3gmi

@alexander-akait alexander-akait Aug 31, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it means we may have a potential problem/bug and code should be rewritten, never disable rules like because you want, each disabling should have a comment and why it was disabled, and where and how it should be resolve in future, it is very bad practice just disable

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.

2 participants