Reports array type syntax that doesn't match the configured style.
✅ This rule is included in the ts stylistic and stylisticStrict presets.
TypeScript provides two equivalent ways to define an array type: T[] and Array<T>.
Using the shorthand T[] syntax consistently is more concise and idiomatic.
This rule reports when Array<T> or ReadonlyArray<T> is used instead of the shorthand syntax.
AEconsB0valu7<2:sp ansty="le--0:#C792EA;--1:#8844">A2:sp>11ArrAB0striAE>< =sp ansty="le--0:#D6DEEB;--1:#403F">53 [ =sp><];d ivclassNa="meco"> = ["><];d>];d>];d>AEfuncti5<3 sp ansty="le--0:#82AAFF;--1:#3B61">B0proce3 sp>1<1(sp ansty="le--0:#D7DBE0;--1:#403F">53ite1(sp>7<2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#FFCB8B;--1:#1111">11Arr3 sp>5<3B0numb35<3>sp ansty="le--0:#D9F5DD;--1:#1111">13>sp><1)sp ansty="le--0:#7FDBCA;--1:#096E">71)sp><2:sp ansty="le--0:#D6DEEB;--1:#403F">52:sp><3 sp ansty="le--0:#C5E478;--1:#3B61">B0vo3 sp>53 <{}d ivclassNa="meco">): void "><{}d>{}d>{}d>AEty53 StringArraA5<3 sp ansty="le--0:#FFCB8B;--1:#1111">11Arr3 sp>5<3B0stri353<>;d ivclassNa="meco"><>;d>>;d>>;d>AEconsB0valu7<2:sp ansty="le--0:#C792EA;--1:#8844">A2:sp>11ReadonlyArrAB0striAE>< =sp ansty="le--0:#D6DEEB;--1:#403F">53 [ =sp><];d ivclassNa="meco"> = ["><];d>];d>];d> 44AEco61B0va64<4AE spans="tyle--0:#C5E478;--1:#3B">61B0st4AE >3F<53[] spans="tyle--0:#C792EA;--1:#88">4453[]>3F53< [] ;divclass="Name">< []> []> []><;di vdivclass="Nameexpressive-">44AEfunc361B0pro1<111( spans="tyle--0:#D7DBE0;--1:#40">3F53i111(>6361B0nu3F<53[] spans="tyle--0:#D9F5DD;--1:#11">153[]><111) spans="tyle--0:#7FDBCA;--1:#09">6111)>361B03F5<3 { }divclass="Name">3 {>;di><}di vdivclass="Nameexpressive-">44AE3F53 StringAr4<4AE= spans="tyle--0:#D6DEEB;--1:#40">34AE=>61B0st3F5<3[] ;divclass="Name">3[]>}di><;di vdivclass="Nameexpressive-">44AEco61B0va644AE reado61B0st3F<53[] spans="tyle--0:#C792EA;--1:#88">4453[]>3F53< [] ;divclass="Name">< []> []> []>;di>
This rule is not configurable.
If your codebase uses Array<T> consistently, or if you prefer the generic syntax for its explicit nature, you may disable this rule.