Disallow leading or trailing spaces in console method string arguments.
✅ This rule is included in the node stylistic and stylisticStrict presets.
Leading or trailing spaces in console output are often unintentional and can make debugging harder.
They can be difficult to spot in console output and may lead to confusion about the actual content being logged.
53consoAB0l5<3(sp ansty="le--0:#D9F5DD;--1:#1111">13(sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dtex1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">531"sp><);d ivclassNa="meco"><);d>);d>);d>53consoAB0err5<3(sp ansty="le--0:#D9F5DD;--1:#1111">13(sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4D error messa1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">531"sp><);d ivclassNa="meco"><);d>);d>);d>53consoAB0wa5<3(sp ansty="le--0:#D9F5DD;--1:#1111">13(sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dwarnin1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">531"sp><, sp ansty="le--0:#D9F5DD;--1:#1111">1, sp><1"sp ansty="le--0:#ECC48D;--1:#984E">4Dmessa1"sp>1<1"sp ansty="le--0:#D6DEEB;--1:#403F">531"sp><);d ivclassNa="meco"><);d>);d>);d> 3F53con4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B4AE.><0log spans="tyle--0:#D6DEEB;--1:#40">30log>1<111" spans="tyle--0:#ECC48D;--1:#98">4E4D111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53) ;divclass="Name">53)><;di vdivclass="Nameexpressive-">6376// Leading spaces on a first argument are allowed as a form of indenta3F53con4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B4AE.><0log spans="tyle--0:#D6DEEB;--1:#40">30log>1<111" spans="tyle--0:#ECC48D;--1:#98">4E4D 111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53) ;divclass="Name">53)>;di><;di vdivclass="Nameexpressive-">3F53con4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B4AE.><0log spans="tyle--0:#D6DEEB;--1:#40">30log>1<111" spans="tyle--0:#ECC48D;--1:#98">4E4D111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53, spans="tyle--0:#D9F5DD;--1:#11">153, ><111" spans="tyle--0:#ECC48D;--1:#98">4E4Dmes111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53) ;divclass="Name">53)>;di><;di vdivclass="Nameexpressive-">3F53con4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B0e4AE.>31<111" spans="tyle--0:#ECC48D;--1:#98">4E4Derror mes111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53) ;divclass="Name">53)>;di><;di vdivclass="Nameexpressive-">3F53con4<4AE. spans="tyle--0:#82AAFF;--1:#3B">61B04AE.>31<111" spans="tyle--0:#ECC48D;--1:#98">4E4Dwar111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53, spans="tyle--0:#D9F5DD;--1:#11">153, ><111" spans="tyle--0:#ECC48D;--1:#98">4E4Dmes111">1<111" spans="tyle--0:#D6DEEB;--1:#40">3F111"><53) ;divclass="Name">53)>;di>
This rule is not configurable.
If you intentionally need leading or trailing spaces in console output for formatting purposes, you might choose not to enable this rule.
However, consider using explicit spacing methods or separate arguments instead for better clarity.