Skip to content
Snippets Groups Projects
Commit 28500f1a authored by Andreas Kienast's avatar Andreas Kienast
Browse files

[TASK] Implement `@typescript-eslint/no-array-delete` rule

The eslint configuration now takes the rule
`@typescript-eslint/no-array-delete` [1] into account, prohibiting
element removal from an array via `delete`. The problem with `delete` is
that the element to be removed is in fact replaced with an `empty` slot,
effectible keeping the array's size. Using `splice()` [2] is the
preferred way to remove elements from an array.

[1] https://typescript-eslint.io/rules/no-array-delete/
[2] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice

Resolves: #103375
Releases: main, 12.4
Change-Id: Ic742a43d44cbd8c5cc323f629cc82ad606a9858f
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83438


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenjamin Franzke <ben@bnf.dev>
Reviewed-by: default avatarBenjamin Franzke <ben@bnf.dev>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
Tested-by: default avatarAndreas Kienast <a.fernandez@scripting-base.de>
parent d92c3c6f
Branches
Tags
No related merge requests found
Showing
with 11 additions and 10 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment