sindresorhus/eslint-plugin-unicorn

Improve `prefer-dom-node-remove`

Chiusa

#2085 aperta il 9 mag 2023

 (0 commenti) (0 reazioni) (0 assegnatari)JavaScript (468 fork)user submission
enhancementhelp wanted

Metriche repository

Star
 (5022 stelle)
Metriche merge PR
 (Merge medio 1g 16h) (399 PR mergiate in 30 g)

Descrizione

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

Guida contributor