Skip to content

Commit

Permalink
docs: small typo in [prefer-replace-text] (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrentz authored and aladdin-add committed Dec 20, 2024
1 parent e909461 commit ba1217b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/rules/prefer-replace-text.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module.exports = {
create(context) {
context.report({
fix(fixer) {
// error, can be written: return fixer.replaceText([node, '']);
// error, can be written: return fixer.replaceText(node, '');
return fixer.replaceTextRange([node.range[0], node.range[1]], '');
},
});
Expand Down

0 comments on commit ba1217b

Please sign in to comment.