feat(eslint): enable unicorn/no-new-array#113204
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit be9d107. Configure here.
| trigger: 'axis' as const, | ||
| }, | ||
| xAxes: Array.from(new Array(series.length)).map((_i, index) => ({ | ||
| xAxes: Array.from(Array.from({length: series.length})).map((_i, index) => ({ |
There was a problem hiding this comment.
Redundant double Array.from wrapping in five locations
Low Severity
The mechanical replacement of new Array(n) with Array.from({length: n}) inside an existing Array.from(...) wrapper created a redundant Array.from(Array.from({length: n})) pattern in five locations. The original Array.from(new Array(n)) was needed to convert a sparse array to a dense one, but Array.from({length: n}) already produces a dense array, making the outer Array.from unnecessary. The same pattern also appears in projectChart.tsx line 153 and flamegraphKeyboardNavigation.spec.ts line 36.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit be9d107. Configure here.
There was a problem hiding this comment.
Yeah that'd be a separate lint rule. IMO it'd be better to not change unrelated behaviors in this PR.


Following #112674 (comment): this lint rule would have caught a bug in my tests that AI flagged.