Skip to content

Prefer String#replaceAll over String#replace #1814

@ericcornelissen

Description

@ericcornelissen

Caused by #1812 (comment)

Summary

Update the code base to move to using String.prototype.replaceAll instead of String.prototype.replace following the eslint-plugin-unicorn rule string-prefer-replace-all and enforce this using ESLint.

This is currently pending because String.prototype.replaceAll was not yet introduced in Node.js v14.18.0, which is still supported by this package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeChanges that are not backwards compatiblependingThis cannot be worked on yetrefactorChanges existing code without changing functionality

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions