sindresorhus/eslint-plugin-unicorn

Improve `prefer-dom-node-remove`

Open

#2,085 opened on May 9, 2023

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (5,022 stars) (468 forks)user submission
enhancementhelp wanted

Description

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

Contributor guide

Improve `prefer-dom-node-remove` · sindresorhus/eslint-plugin-unicorn#2085 | Good First Issue