sindresorhus/eslint-plugin-unicorn

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

Chiusa

#2098 aperta il 15 mag 2023

 (8 commenti) (1 reazione) (0 assegnatari)JavaScript (468 fork)user submission
bughelp wantedtypes

Metriche repository

Star
 (5022 stelle)
Metriche merge PR
 (Merge medio 4h 30m) (26 PR mergiate in 30 g)

Descrizione

origin:

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

after auto fix:

parent?.childNodes.at(-1);

unicorn/prefer-at

not safe

Guida contributor