sindresorhus/eslint-plugin-unicorn

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

Open

#2,098 opened on 2023年5月15日

GitHub で見る
 (8 comments) (1 reaction) (0 assignees)JavaScript (5,022 stars) (468 forks)user submission
bughelp wantedtypes

説明

origin:

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

after auto fix:

parent?.childNodes.at(-1);

unicorn/prefer-at

not safe

コントリビューターガイド

[unicorn/prefer-at] should avoid auto fix " parent?.childNodes[parent.childNodes.length - 1];" · sindresorhus/eslint-plugin-unicorn#2098 | Good First Issue