no-array-front-mutation
Added in v0.9.1Configuration
rslint.config.ts
Rule Details
Disallow mutating the front of an array with Array#shift() or
Array#unshift(). Re-indexing the remaining elements can make these methods
unexpectedly expensive for large arrays.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
The rule allows unshift() on common Node.js stream objects, where it has
stream-specific semantics rather than array semantics: