Change Request: Reject non string replacements in fixer.replaceText()
#18807
Open
Description
opened on Aug 23, 2024
ESLint version
v9
What problem do you want to solve?
In a rule fix
function,
fixer.replaceText(node, replacement.text);
when replacement.text
is undefined, it will replace the node with undefined
.
What do you think is the correct solution?
Throw an error instead.
Participation
- I am willing to submit a pull request for this change.
Additional comments
Prevent mistakes.
Metadata
Assignees
Labels
Type
Projects
Status
Feedback Needed
Activity