0 留言 (0 留言)0 反應 (0 反應)0 負責人 (0 負責人)JavaScript5,022 star (5,022 star)468 fork (468 fork)user submission
enhancementhelp wanted
- 議題類型
- refactor
- 研究方向
- 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.