Skip to content

booleanValues

Prefer shorthand boolean attributes over explicit {true} values in JSX.

✅ This rule is included in the jsx stylistic presets.

When a boolean JSX attribute is set to true, the value can be omitted entirely. The shorthand syntax is more concise and idiomatic in JSX, reducing visual noise and improving readability.

CE6buttCB0disablA3<4{sp ansty="le--0:#FF6A83;--1:#A248">48tr3<4}sp ansty="le--0:#7FDBCA;--1:#8844">Asp ansty="le--0:#D6DEEB;--1:#403F">53Click sp>CA<E6buttCd ivclassNa="meco">d>d>d>CE6inpCB0tyA1<1"sp ansty="le--0:#ECC48D;--1:#984E">4Dte1<1"sp ansty="le--0:#7FDBCA;--1:#8844">AB0requirA3<4{sp ansty="le--0:#FF6A83;--1:#A248">48tr3<4}sp ansty="le--0:#7FDBCA;--1:#8844">AE d ivclassNa="meco">d>d>d>A82ComponeAB0isActiA3<4{sp ansty="le--0:#FF6A83;--1:#A248">48tr3<4}sp ansty="le--0:#7FDBCA;--1:#8844">AE d ivclassNa="meco">d>d>d>
<44AE spans="tyle--0:#7F">DECE6buD61B0disa4<4AE> spans="tyle--0:#D6DEEB;--1:#40">3F53Clic><44AE spans="tyle--0:#7F">DBECE6buD<>di vdivclass="Nameexpressive-"><44AE spans="tyle--0:#7F">DECE6iD61B04<4AE= spans="tyle--0:#D9F5DD;--1:#11">1<111" spans="tyle--0:#ECC48D;--1:#98">4E4D1<111" spans="tyle--0:#7FDBCA;--1:#88">4<4AE spans="tyle--0:#C5E478;--1:#3B">61B0requ44Adi><>di vdivclass="Nameexpressive-">4<4AE< spans="tyle--0:#F78C6C;--1:#AA">0982Compo4<4AE spans="tyle--0:#C5E478;--1:#3B">61B0isAc44Adi><>di vdivclass="Nameexpressive-"><44AE spans="tyle--0:#7F">DECE6buD61B0disa4<4AE= spans="tyle--0:#E2817F;--1:#B2">3<834{ spans="tyle--0:#FF6A83;--1:#A2">4848f3<834} spans="tyle--0:#7FDBCA;--1:#88">4<4AE> spans="tyle--0:#D6DEEB;--1:#40">3F53Explicit false is ><44AE spans="tyle--0:#7F">DBECE6buDdi><>di vdivclass="Nameexpressive-">4<4AE< spans="tyle--0:#F78C6C;--1:#AA">0982Compo4<4AE spans="tyle--0:#C5E478;--1:#3B">61B0isAc4<4AE= spans="tyle--0:#E2817F;--1:#B2">3<834{ spans="tyle--0:#D6DEEB;--1:#40">3F53someCondi3<834} spans="tyle--0:#7FDBCA;--1:#88">44A<} />di>

This rule is not configurable.

If your project has an established style guide that prefers explicit boolean values for consistency or clarity, you may want to disable this rule. However, the shorthand syntax is widely accepted as idiomatic JSX.