sindresorhus/eslint-plugin-unicorn

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

Open

#2 098 ouverte le 15 mai 2023

Voir sur GitHub
 (8 commentaires) (1 réaction) (0 assignés)JavaScript (5 022 stars) (468 forks)user submission
bughelp wantedtypes

Description

origin:

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

after auto fix:

parent?.childNodes.at(-1);

unicorn/prefer-at

not safe

Guide contributeur