fix: replace deprecated trimRight() with trimEnd() (#7265)