`noSelfAssign` misses self-assignment across dot and bracket notation
Author: AlbinoGeekCreated Sep 24, 2026Updated Sep 29, 2026
LabelsA-LinterL-JavaScriptS-Bug-confirmed
Environment information
CLI:
Version: 2.5.14
Platform:
CPU Architecture: x86_64
OS: linux
Environment:
BIOME_DISTRIBUTION: npm
JS_RUNTIME_NAME: nodeRule name
correctness/noSelfAssign
Playground link
export function f(o) {
o.x = o.x; // reported
o["x"] = o["x"]; // reported
o["x"] = o.x; // not reported
o[0] = o["0"]; // not reported
}o.x = o.x and o["x"] = o["x"] are reported, but o["x"] = o.x and o[0] = o["0"] are not, although each pair names the same property. ESLint's no-self-assign reports o["x"] = o.x.
Reproduced with the 2.5.14 CLI and in the playground (f74eb38).
Expected result
Static member names are compared by property name, so dot notation, string literal and numeric literal keys that resolve to the same property are treated as equal.
Code of Conduct
- I agree to follow Biome's Code of Conduct
Tool Use Disclaimer: Claude Code using Anthropic Opus 5.5 helped build the reproduction.
Source: biomejs/biome