sindresorhus/eslint-plugin-unicorn

[unicorn/prefer-at] should avoid auto fix " parent?.childNodes[parent.childNodes.length - 1];"

Open

#2.098 geöffnet am 15. Mai 2023

Auf GitHub ansehen
 (8 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (5.022 Stars) (468 Forks)user submission
bughelp wantedtypes

Beschreibung

origin:

parent?.childNodes[parent.childNodes.length - 1];

after auto fix:

parent?.childNodes.at(-1);

unicorn/prefer-at

not safe

Contributor Guide