File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -304,7 +304,11 @@ export function buildBwipOptions(
304304 // needed.
305305 const rotation = objectRotation ( obj . props ) ;
306306
307- let opts : Record < string , unknown > | null = null ;
307+ // Declared without an initializer because every reachable case
308+ // assigns before `break` and the `default` arm returns early — the
309+ // previous `= null` initializer is what ESLint 10's
310+ // no-useless-assignment now flags as dead.
311+ let opts : Record < string , unknown > ;
308312
309313 switch ( obj . type ) {
310314 case "ean13" :
@@ -498,7 +502,7 @@ export function buildBwipOptions(
498502 return null ;
499503 }
500504
501- if ( opts && rotation !== "N" ) {
505+ if ( rotation !== "N" ) {
502506 // ZPL uses N/R/I/B (B = 270° CW). bwip-js uses N/R/I/L (L = 90° CCW =
503507 // 270° CW). The other three letters mean the same thing in both.
504508 opts . rotate = rotation === "B" ? "L" : rotation ;
You can’t perform that action at this time.
0 commit comments