sindresorhus/eslint-plugin-unicorn
Do you want to work on this issue?
You can request for a bounty in order to promote it!
[unicorn/prefer-at] should avoid auto fix " parent?.childNodes[parent.childNodes.length - 1];" #2098
tjx666 posted onGitHub
<!-- ✨ Thanks for reporting a bug! ➡️ Please don't ignore this template -->
<!-- 1️⃣ Explain here what's wrong -->
origin:
parent?.childNodes[parent.childNodes.length - 1];
after auto fix:
parent?.childNodes.at(-1);
<!-- 2️⃣ Specify which rule is buggy here and in the title -->
unicorn/prefer-at
<!-- 3️⃣ Add some examples where the issue appears -->
not safe