sindresorhus/eslint-plugin-unicorn

Improve `prefer-dom-node-remove`

Open

#2,085 创建于 2023年5月9日

在 GitHub 查看
 (0 评论) (0 反应) (0 负责人)JavaScript (5,022 star) (468 fork)user submission
enhancementhelp wanted

描述

  • Use snapshot test https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2333
  • Improve fix, not use the original text but manipulate tokens
  • Improve fix for node?.parentNode.removeChild(node) (node can be anything, the object and the argument should be same reference, but can be different AST, eg: a?.b?.parentNode.remove(a.b))

贡献者指南