Skip to content

Comments

fix(linter): Add missing fail cases in eslint-no-array-constructor#9659

Merged
camchenry merged 5 commits intooxc-project:mainfrom
therewillbecode:fix/eslint-no-array-constructor
Mar 12, 2025
Merged

fix(linter): Add missing fail cases in eslint-no-array-constructor#9659
camchenry merged 5 commits intooxc-project:mainfrom
therewillbecode:fix/eslint-no-array-constructor

Conversation

@therewillbecode
Copy link
Contributor

Adds the following missing fail cases for the rule where the last argument to the array constructor is a spread element:

new Array(...args);
Array(...args);
Array(1, 2, ...args);

I setup an eslint playground to show the cases failing here

@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 10, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@github-actions github-actions bot added A-linter Area - Linter C-bug Category - Bug labels Mar 10, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 10, 2025

CodSpeed Performance Report

Merging #9659 will not alter performance

Comparing therewillbecode:fix/eslint-no-array-constructor (d205ff7) with main (835984f)

Summary

✅ 33 untouched benchmarks

@therewillbecode therewillbecode requested a review from Boshen March 11, 2025 21:11
@camchenry camchenry merged commit 91c009a into oxc-project:main Mar 12, 2025
25 checks passed
Boshen added a commit that referenced this pull request Mar 12, 2025
## [0.15.15] - 2025-03-12

### Features

- 2ddad59 linter: Add unicorn/require-post-message-target-origin rule
(#9684) (yefan)
- 474a57b linter: A new multi-file analysis runtime (#9383) (branchseer)

### Bug Fixes

- 6c0978b linter: No-single-promise-in-promise-methods: do not fix
Promise.all when chained (#9697) (camchenry)
- ab594f1 linter: Turn oxc/no-redundant-constructor-init into
typescript/no-unnecessary-parameter-property-assignment (#9618) (Uli)
- 91c009a linter: Add missing fail cases in
`eslint-no-array-constructor` (#9659) (therewillbecode)
- 2810e5b linter: Add missing fail cases in eslint/no-self-compare
(#9693) (therewillbecode)

### Refactor

- b9ab60b linter: Remove if let nesting from `bad-min-max-function`
(#9722) (therewillbecode)
- 90b0227 linter: Remove if let nesting from
`eslint-operator-assignment` (#9721) (therewillbecode)
- 5ef578e linter: Improve `jest/no-alias-methods` (#9694)
(therewillbecode)

Co-authored-by: Boshen <[email protected]>
@therewillbecode therewillbecode deleted the fix/eslint-no-array-constructor branch March 13, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants