prefer-string-trim-start-end
UnreleasedConfiguration
rslint.config.ts
Rule Details
Prefer String#trimStart() and String#trimEnd() over the legacy
String#trimLeft() and String#trimRight() aliases. The preferred names are
direction-independent and therefore clearer for both left-to-right and
right-to-left text.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Optional access is checked, while an optional call is left unchanged: