fixhunt

biome style/noImplicitBoolean

labelled safe
Runs / 2026-10-17T20-56-18-004Z-g9m1-biome-style_noImplicitBooleanbiome 2.5.152026-10-17 20:56 UTC8 programs × 2 round(s)16 programs, 0 fired, 0 fixed, 0 findings, 15 rejectedmodel cost $0.0039

Analysis Nemotron 3 Super

The rule flags JSX boolean attributes written without an explicit value (e.g., `<input disabled />`), which implicitly evaluate to `true`, requiring them to be rewritten with an explicit boolean or falsy value.

Fix: The autofix rewrites the implicit boolean attribute by appending `={true}` to the attribute name, converting `<input disabled />` into `<input disabled={true} />`.

1 hazards
  • Rewriting `<input disabled />` to `<input disabled={true} />` changes nothing in behavior but may interfere with tools that rely on the syntactic distinction between minimized and non-minimized attributes, such as certain HTML minifiers or legacy parsers.

Programs

idresulttitlehazard
r1-p001invalidJSX implicit boolean with exception in expressionexceptions thrown inside the code the fix removes or rewrites
r1-p002invalidArguments object capture via closure over JSX proparguments object, function.length, default parameters, rest parameters
r1-p003invalidThis binding affected by JSX rewrite in event handlerthis binding: arrow vs function, methods extracted from objects, call/apply/bind
r1-p004invalidClass field initialization order with JSX propclass fields, static blocks, private names, super calls
r1-p005invalidVar hoisting and redeclaration in loop with JSXvar hoisting and re-declaration inside loops or after use
r1-p006invalidSparse array interaction with JSX attribute spreadsparse arrays, holes, Array(n) vs [n], array-likes
r1-p007invalidGetter side effect toggling JSX implicit booleangetters, setters and Object.defineProperty side effects
r1-p008invalidASI hazard with leading parenthesis after JSXASI and semicolon-less code, leading ( or [ on the next line
r2-p001silent prediction offMinimized vs Non-Minimized Attribute ImpactRewriting `<input disabled />` to `<input disabled={true} />` changes nothing in behavior but may interfere with tools that rely on the syntactic distinction between minimized and non-minimized attrib
r2-p002invalidOrder of Evaluation Side Effect Duplicationorder of evaluation when expressions are merged, duplicated or deleted (side effects run twice or never)
r2-p003invalidGetter Side Effect Toggling Implicit Booleangetters, setters and Object.defineProperty side effects
r2-p004invalidRegExp LastIndex with g Flag Interactionregular expressions: escapes, unicode flag, lastIndex with the g flag
r2-p005invalidLabel/Break/Continue Control Flow with Finallylabel/break/continue control flow, finally blocks, early returns in nested blocks
r2-p006invalidNumeric/String Coercion: + vs Template Literalnumeric/string coercion: + vs template literal, objects with toString/valueOf, Symbol, BigInt
r2-p007invalid__proto__ Keys and Prototype Access__proto__ keys, prototype access, Object.assign vs spread
r2-p008invalidVar Hoisting and Re-declaration in Loopvar hoisting and re-declaration inside loops or after use

Sources

r1-p001 · JSX implicit boolean with exception in expression (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1function bad() { throw new Error('fail'); }
2try {
3 console.log(<div onclick={() => bad()} hidden />);
4} catch (e) {
5 console.log(e.name + ': ' + e.message);
6}
r1-p002 · Arguments object capture via closure over JSX prop (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1function foo(a, b = 1, ...rest) {
2 return () => {
3 console.log(arguments.length, rest.length);
4 return <div disabled arguments={arguments.length} />;
5 };
6}
7const fn = foo(1, 2, 3);
8fn();
r1-p003 · This binding affected by JSX rewrite in event handler (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1const obj = {
2 val: 42,
3 handler: function() { return this.val; }
4};
5const extracted = obj.handler;
6console.log(<button onClick={extracted.bind(obj)} type="button" />);
7console.log(<button onClick={extracted} type="button" disabled />);
r1-p004 · Class field initialization order with JSX prop (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1class Base {
2 constructor() {
3 this.baseVal = this.compute();
4 }
5 compute() { return 1; }
6}
7class Derived extends Base {
8 val = this.compute();
9 compute() { return this.baseVal + 1; }
10 render() {
11 return <span open>{this.val}</span>;
12 }
13}
14console.log(new Derived().render());
r1-p005 · Var hoisting and redeclaration in loop with JSX (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1for (var i = 0; i < 2; i++) {
2 var x = i;
3 if (i === 0) {
4 console.log(x); // first iteration
5 } else {
6 console.log(x); // second iteration - should be 1 but may be affected
7 }
8 console.log(<input key={i} disabled />);
9}
r1-p006 · Sparse array interaction with JSX attribute spread (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1const arr = Array(3);
2arr[1] = 'present';
3console.log(arr.length);
4console.log(<div {...{ hidden: arr[1] }} />);
5console.log(<div hidden={arr[0]} />);
r1-p007 · Getter side effect toggling JSX implicit boolean (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1let toggle = false;
2Object.defineProperty(Object.prototype, 'hidden', {
3 get() { return toggle = !toggle; }
4});
5console.log(<div hidden />); // first: true
6console.log(<div hidden />); // second: false
7console.log(<div hidden={true} />); // explicit
r1-p008 · ASI hazard with leading parenthesis after JSX (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1let x = 1
2(<div disabled />).catch(() => x = 2)
3console.log(x)
4[1,2,3].map(y => y)
r2-p001 · Minimized vs Non-Minimized Attribute Impact
1// Hazard 1: Minimized attribute syntax sensitivity
2let html = '';
3function render() {
4 return `<input${disabled ? ' disabled' : ''} />`;
5}
6const disabled = true;
7html += render();
8console.log(html.trim());
<input disabled />
r2-p002 · Order of Evaluation Side Effect Duplication (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 2: Order of evaluation - side effect duplication
2let count = 0;
3function inc() { return count++; }
4const x = inc();
5console.log('x:', x);
6// Rule fires on minimized attribute below
7const el = <button disabled={inc()} />;
8console.log('count after:', count);
r2-p003 · Getter Side Effect Toggling Implicit Boolean (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 3: Getter side effect toggling JSX implicit boolean
2const obj = {
3 get disabled() {
4 console.log('getter called');
5 return true;
6 }
7};
8console.log('before:');
9const el = <input disabled={obj.disabled} />;
10console.log('after:');
r2-p004 · RegExp LastIndex with g Flag Interaction (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 4: RegExp lastIndex with g flag
2const regex = /a/g;
3console.log('first match:', regex.exec('baaab'));
4console.log('lastIndex after first:', regex.lastIndex);
5// Rule fires here - if fixed, may re-evaluate regex in JSX
6const el = <input disabled={!!regex.exec('baaab')[0]} />;
7console.log('lastIndex after JSX:', regex.lastIndex);
r2-p005 · Label/Break/Continue Control Flow with Finally (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 5: Label/break/continue with finally
2outer: {
3 try {
4 // Rule fires below
5 const el = <div hidden />;
6 break outer;
7 } finally {
8 console.log('finally ran');
9 }
10}
11console.log('after outer');
r2-p006 · Numeric/String Coercion: + vs Template Literal (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 6: Numeric/string coercion
2const obj = {
3 valueOf() { return 1; },
4 toString() { return 'obj'; }
5};
6console.log('+ coercion:', +obj);
7console.log('template literal:', `${obj}`);
8// Rule fires here - value used in JSX attribute
9const val = +obj;
10const el = <input disabled={val} />;
11console.log('el disabled value:', val);
r2-p007 · __proto__ Keys and Prototype Access (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 7: __proto__ and prototype access
2const base = { disabled: false };
3const obj = { __proto__: base, disabled: true };
4console.log('obj.disabled:', obj.disabled);
5// Rule fires here - reading property that may come from prototype
6const el = <input disabled={obj.disabled} />;
7console.log('after JSX, obj.disabled:', obj.disabled);
r2-p008 · Var Hoisting and Re-declaration in Loop (generated program does not parse: /home/sun/dev/diaghunt/runs/2026-10-17T20-56-1)
1// Hazard 8: Var hoisting and re-declaration in loop
2for (var i = 0; i < 2; i++) {
3 var disabled = i === 0; // hoisted, redeclared
4 console.log('iteration', i, 'disabled:', disabled);
5 // Rule fires here - uses loop-scoped var
6 const el = <input disabled={disabled} />;
7}
8console.log('final disabled:', disabled);