# biome style/useTrimStartEnd: fix changes program behavior

Internal evidence sheet generated by fixhunt. Not an issue text. A human re-verifies, checks the duplicates
below, and writes the upstream report in their own words following the project's AI policy.

- Tool: biome 2.5.15
- Rule: style/useTrimStartEnd (tool labels the fix: safe, this fix reported as safe)
- Oracle: fix-changes-behavior
- Judge (Nemotron 3 Ultra, advisory): intended-change, severity low. The rule intentionally replaces the deprecated aliases trimLeft/trimRight with the standard trimStart/trimEnd methods. The program calls trimLeft on a plain object that lacks either method, so both the original and fixed code throw a TypeError; the only difference is the method name in the error message, which directly reflects the documented rewrite.
- Program: minimized from 4 to 3 lines

## Reproducer

```js
let obj = {
};
console.log((obj).trimLeft() + 'def');
```

## Commands

```sh
node prog.js
bunx @biomejs/biome lint --only=style/useTrimStartEnd --write prog.js
node prog.js
```

## Observed

```
stderr before: TypeError: obj.trimLeft is not a function
stderr after: TypeError: obj.trimStart is not a function
```

## Diff applied by the fix

```diff
--- orig.js	2026-10-22 13:36:09.655755775 -0400
+++ fixed.js	2026-10-22 13:36:11.665789715 -0400
@@ -1,3 +1,3 @@
 let obj = {
 };
-console.log((obj).trimLeft() + 'def');
+console.log((obj).trimStart() + 'def');
```

## Why the rewrite is not equivalent (model draft, verify before use)

The original method name trimLeft does not exist on objects; it was incorrectly assumed to be available like on strings. Renaming it to trimStart preserves the same incorrect assumption—both are undefined for plain objects—so the TypeError persists unchanged. The behavior differs only in the method name referenced in the error message, but the underlying semantics (attempting to call a non-existent method on an object) remain identical, making the rewrite ineffective at fixing the core issue. No actual behavioral change occurs beyond the error’s label.

## Upstream search

Queries: "useTrimStartEnd fix", "style/useTrimStartEnd trimLeft method call", "style/useTrimStartEnd deprecated string methods", "style/useTrimStartEnd object trimLeft usage"

- no duplicate or related report found among 20 hits

<details><summary>All hits</summary>

- [github, open] 💅 `lint/correctness/noUnusedImports` does not consider uses inside comments that precede non-declaration statements (start/end of file, etc.) — https://github.com/biomejs/biome/issues/8762
- [github, closed] 💅 `useSimplifiedLogicExpression` "safe" fix breaks code — https://github.com/biomejs/biome/issues/11351
- [github, closed] 💅 `useExplicitLengthCheck` false positive and broken fix — https://github.com/biomejs/biome/issues/11558
- [github, closed] 💅 Corrupted CLI safe fix for `useConsistentArrowReturn` — https://github.com/biomejs/biome/issues/8347
- [github, closed] 💅 `useExplicitLengthCheck` false positive — https://github.com/biomejs/biome/issues/11352
- [github, closed] 💅 lint/nursery/noUselessUndefined fix is unsafe for functions with union return types — https://github.com/biomejs/biome/issues/6906
- [github, closed] 💅 `noLeakedRender` false positives — https://github.com/biomejs/biome/issues/10514
- [github, closed] 💅 `useFilenamingConvention` override not applying to TanStack Start splat route files ($.ts, rpc.$.ts) — https://github.com/biomejs/biome/issues/9082
- [github, closed] 💅 false positive of `noUnresolvedImports` with `io-ts/Decoder` — https://github.com/biomejs/biome/issues/11013
- [github, closed] 💅 New rule for `noDeprecatedImports` not working with declarations — https://github.com/biomejs/biome/issues/7635
- [tavily] 💅 `useDestructuring` doesn't work with type annotations · Issue #8478 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8478
- [tavily] 💅 `lint/correctness/useSingleJsDocAsterisk` false positive when attempting to start with italics · Issue #7603 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7603
- [tavily] 💅 noParametersOnlyUsedInRecursion false positives · Issue #8004 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8004
- [tavily] 💅 Incorrectly suggest to discard redundant terms (useSimplifiedLogicExpression) · Issue #8577 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8577
- [tavily] 💅 `nusery/noShadow` should not flag parameter names of function types · Issue #9482 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/9482
- [tavily] 💅 `useDestructuring` suggests illegal destructuring operations · Issue #8480 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/8480
- [tavily] 💅 False positive by lint/nursery/noUselessUndefined · Issue #6577 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/6577
- [tavily] 💅 False positive: import reported as "only used as types" when used in Svelte template · Issue #9358 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/9358
- [tavily] 💅 `lint/nursery/useMaxParams` should not put error squiggles over the entire method · Issue #7604 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/7604
- [tavily] 🐛 `noFloatingPromises` inconsistent behavior in 2.5.8+ · Issue #11529 · biomejs/biome · GitHub — https://github.com/biomejs/biome/issues/11529

</details>
