sindresorhus/eslint-plugin-unicorn

Improve `prefer-dom-node-remove`

已关闭

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

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (468 个派生)user submission
enhancementhelp wanted

仓库指标

星标
 (5,022 个星标)
PR 合并指标
 (平均合并 1天 16小时) (30 天内合并 399 个 PR)

描述

  • 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))

贡献者指南