0 comments (0 comments)0 reactions (0 reactions)0 assignees (0 assignees)JavaScript5,022 stars (5,022 stars)468 forks (468 forks)user submission
enhancementhelp wanted
- Issue type
- refactor
- Research direction
- Examine the existing fixer in `rules/prefer dom node remove.js` (likely in the repository). Review the merged PR #2333 for snapshot test style. For the second task, replace the use of original text with token manipulation by accessing AST tokens via `sourceCode.getTokens()` or similar. For the third task, handle optional chaining (e.g., `node?.parentNode.removeChild(node)`) ensuring the same reference is used in both the object and argument; consider using `sourceCode.getText()` or comparing AST nodes. Look at existing tests in `test/snapshots/prefer dom node remove.md` for guidance.