dataview-endianness
view.getUint32(offset) without the littleEndian argument.
Why: DataView reads and writes big-endian by default, while most binary formats and every common CPU are little-endian. Forgetting the argument reads 0x8BADF00D as 0x0DF0AD8B (v8.dev). Saying it explicitly costs nothing.
✕ Rejecteddataview-endianness
ts
export function magic(view: DataView): number {
return view.getUint32(0);
}✓ Accepted0 diagnostics
ts
export function magic(view: DataView): number {
return view.getUint32(0, true);
}Quick fixes: Little-endian (true) and Big-endian (false, the default). One-byte accessors (getUint8) have no byte order and are not reported.