sindresorhus/eslint-plugin-unicorn
Improve `prefer-dom-node-remove`
Closed
#2,085 opened on May 9, 2023
enhancementhelp wanted
Repository metrics
- Stars
- (5,022 stars)
- PR merge metrics
- (Avg merge 1d 16h) (399 merged PRs in 30d)
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))