fixhunt

biome style/useNamingConvention

labelled safe
Runs / 2026-10-17T21-02-48-155Z-5pwz-biome-style_useNamingConventionbiome 2.5.152026-10-17 21:02 UTC8 programs × 2 round(s)14 programs, 5 fired, 3 fixed, 1 findings, 4 rejectedmodel cost $0.02

Analysis Nemotron 3 Super

Enforces camelCase/PascalCase/CONSTANT_CASE naming conventions for all identifiers except those explicitly ignored.

Fix: Renames the identifier to comply with the applicable naming convention (camelCase for locals/parameters, PascalCase for types/classes/enums/namespaces, CONSTANT_CASE for module-level const/var, camelCase/PascalCase for imports/exports), preserving all other tokens and formatting exactly.

10 hazards
  • Renaming a variable referenced via `eval()` or dynamic property access breaks the reference because the string literal is not updated.
  • Renaming a function that is used as a constructor via `new window[oldName]()` changes behavior if the global property isn't updated.
  • Renaming a variable that closes over a function used in `setTimeout` creates a mismatch if the callback refers to the old name via closure or string.
  • Renaming a class that is extended via `eval('class extends ' + oldName)` breaks inheritance because the string lookup fails.
  • Renaming an enum member used in a bitwise operation like `flags & Enum.OldMember` silently changes semantics if the numeric value differs after rename (though Biome preserves value).
  • Renaming a variable in a with-statement scope (`with(obj) { x }`) may alter resolution if `obj` has a property matching the old or new name.
  • Renaming a function that is overridden in a derived class via string-based dispatch (`this[methodName]()`) causes the wrong method to be called if the string doesn't match.
  • Renaming an identifier that has a comment attached on the same line may detach or misplace the comment if the formatter doesn't preserve trailing comments during token replacement.
  • Renaming a variable that is named identically to a label (`label: while (label < 10) label++`) creates a conflict because the label and variable share the same name in different namespaces.
  • Renaming a private class field (if conventionally matched) that is accessed via `this[#field]` is invalid syntax—Biome doesn’t rename private fields, but if it did, it would break because `#` is not part of the identifier.

Findings

programoraclelabeljudgestatussummary
r1-p002fix-not-fixpointlabelled safereal · highrelatedThe fix renames class A_value to AValue, but the eval string concatenates Base.name to dynamically extend that class. After the fix, Base.name becomes 'AValue'…

Programs

idresulttitlehazard
r1-p001invalidPrivate field accessed via bracket notationRenaming a private class field (if conventionally matched) that is accessed via this[#field] is invalid syntax—Biome doesn’t rename private fields, but if it did, it would break because # is not part
r1-p002fix-not-fixpointClass name referenced via eval stringRenaming a class that is extended via eval('class extends ' + oldName) breaks inheritance because the string lookup fails.
r1-p003silent prediction offVariable name conflicting with labelRenaming a variable that is named identically to a label (label: while (label < 10) label++) creates a conflict because the label and variable share the same name in different namespaces.
r1-p004fix okTrailing comment detached during renameRenaming an identifier that has a comment attached on the same line may detach or misplace the comment if the formatter doesn't preserve trailing comments during token replacement.
r1-p005fix okFunction used as constructor via window lookupRenaming a function that is used as a constructor via new window[oldName]() changes behavior if the global property isn't updated.
r1-p007invalidRegex with escapes, unicode flag, lastIndexregular expressions: escapes, unicode flag, lastIndex with the g flag
r1-p008silent prediction offClass with static block, field, private name, superclass fields, static blocks, private names, super calls
r2-p002fired, no fixFunction overridden via string-based dispatchRenaming a function that is overridden in a derived class via string-based dispatch (`this[methodName]()`) causes the wrong method to be called if the string doesn't match.
r2-p003invalidStrict vs sloppy mode semanticsstrict vs sloppy mode semantics
r2-p004silent prediction offASI and semicolon-less codeASI and semicolon-less code, leading ( or [ on the next line
r2-p005silent prediction offComments attached to renamed identifiercomments attached to the removed or moved code
r2-p006silent prediction offVariable name conflicting with labelRenaming a variable that is named identically to a label (`label: while (label < 10) label++`) creates a conflict because the label and variable share the same name in different namespaces.
r2-p007invalidPrivate field accessed via bracket notationRenaming a private class field (if conventionally matched) that is accessed via `this[#field]` is invalid syntax—Biome doesn’t rename private fields, but if it did, it would break because `#` is not p
r2-p008fired, no fixClass with static block, field, private name, superclass fields, static blocks, private names, super calls

Sources

r1-p001 · Private field accessed via bracket notation (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T21-02-4)
1class Test {
2 #a_value = 42;
3 method() {
4 return this[#a_value];
5 }
6}
7console.log(new Test().method());
r1-p002 · Class name referenced via eval string
1let Base = class A_value {};
2let Derived = eval('class extends ' + Base.name + ' {}');
3console.log(new Derived() instanceof Base ? 'ok' : 'fail');
--- orig.js	2026-10-17 17:02:57.529613904 -0400
+++ fixed.js	2026-10-17 17:02:57.806617145 -0400
@@ -1,3 +1,3 @@
-let Base = class A_value {};
+let Base = class AValue {};
 let Derived = eval('class extends ' + Base.name + ' {}');
 console.log(new Derived() instanceof Base ? 'ok' : 'fail');
r1-p003 · Variable name conflicting with label
1outer: while (fooYPosition < 3) {
2 console.log(fooYPosition);
3 fooYPosition++;
4 if (fooYPosition === 3) break outer;
5}
r1-p004 · Trailing comment detached during rename
1let a_value = 0; // counter
2console.log(a_value);
--- orig.js	2026-10-17 17:02:58.208621849 -0400
+++ fixed.js	2026-10-17 17:02:58.498625241 -0400
@@ -1,2 +1,2 @@
-let a_value = 0; // counter
-console.log(a_value);
+let aValue = 0; // counter
+console.log(aValue);
0
r1-p005 · Function used as constructor via window lookup
1function f(FIRST_PARAM) {
2 return FIRST_PARAM * 2;
3}
4let Constructor = window[f.name];
5let instance = new Constructor(5);
6console.log(instance instanceof f ? 'ok' : 'fail', instance.constructor === f ? 'same' : 'diff');
--- orig.js	2026-10-17 17:02:58.668627230 -0400
+++ fixed.js	2026-10-17 17:02:58.950630529 -0400
@@ -1,5 +1,5 @@
-function f(FIRST_PARAM) {
-  return FIRST_PARAM * 2;
+function f(FirstParam) {
+  return FirstParam * 2;
 }
 let Constructor = window[f.name];
 let instance = new Constructor(5);
r1-p007 · Regex with escapes, unicode flag, lastIndex (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T21-02-4)
1let regex = /\\u{1F600}/gu;
2regex.lastIndex = 0;
3let match = regex.exec('😀');
4console.log(match ? match[0] : null);
r1-p008 · Class with static block, field, private name, super
1class Base {
2 constructor() {
3 this.baseProp = 'base';
4 }
5}
6class Derived extends Base {
7 static #privateStatic = 'secret';
8 static {
9 try {
10 console.log('static block:', Derived['#privateStatic']);
11 } catch (e) {
12 console.log('private static access failed:', e.name);
13 }
14 }
15 #instanceField = 'instance';
16 value = this.#instanceField;
17 constructor() {
18 super();
19 this.derivedProp = 'derived';
20 }
21}
22let d = new Derived();
23console.log(d.baseProp, d.derivedProp, d.value);
static block: undefined
base derived instance
r2-p002 · Function overridden via string-based dispatch
1class Base {
2 method_name() {
3 return 'base';
4 }
5 call() {
6 return this['method_name']();
7 }
8}
9class Derived extends Base {
10 method_name() {
11 return 'derived';
12 }
13}
14console.log(new Derived().call());
derived
r2-p003 · Strict vs sloppy mode semantics (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T21-02-4)
1"use sloppy";
2let bad_form = 1;
3with ({}) {
4 bad_form = 2;
5}
6console.log(bad_form);
r2-p004 · ASI and semicolon-less code
1let risky = 1
2(function(){ console.log('iife', risky) })()
3let arr = [1,2]
4[arr].forEach(v => console.log('array', v))
r2-p005 · Comments attached to renamed identifier
1let counter /* tracks iterations */ = 0;
2while (counter < 3) {
3 console.log(counter);
4 counter++;
5}
0
1
2
r2-p006 · Variable name conflicting with label
1outer:
2for (let outer = 0; outer < 2; outer++) {
3 inner:
4 for (let inner = 0; inner < 2; inner++) {
5 if (inner === 1) break outer;
6 console.log('inner', inner);
7 }
8 console.log('outer', outer);
9}
inner 0
r2-p007 · Private field accessed via bracket notation (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T21-02-4)
1class Test {
2 #private_field = 42;
3 getValue() {
4 return this[#private_field]; // This is a syntax error, intentional to show invalid pattern
5 }
6}
7try {
8 new Test().getValue();
9} catch (e) {
10 console.log(e.name, e.message);
11}
r2-p008 · Class with static block, field, private name, super
1class Base {
2 static static_base = 1;
3 base_prop = 2;
4 #private_base = 3;
5 method() {
6 return 'base';
7 }
8}
9class Derived extends Base {
10 static {
11 Derived.static_derived = Base.static_base + 10;
12 }
13 derived_prop = 4;
14 #private_derived = 5;
15 method() {
16 return super.method() + ' -> derived';
17 }
18}
19const d = new Derived();
20console.log('static_base:', Base.static_base);
21console.log('static_derived:', Derived.static_derived);
22console.log('base_prop:', d.base_prop);
23console.log('derived_prop:', d.derived_prop);
24console.log('method:', d.method());
static_base: 1
static_derived: 11
base_prop: 2
derived_prop: 4
method: base -> derived