no-global-assign
Configuration
rslint.config.ts
Rule Details
Disallows assignments to native objects or read-only global variables. Built-in globals such as Object, Array, String, Number, Math, JSON, undefined, NaN, Infinity, and others should not be reassigned, as doing so can cause unexpected behavior throughout the application.
Examples of incorrect code for this rule:
Examples of correct code for this rule:
Options
This rule accepts an optional object with an exceptions property, which is an array of global names that should be allowed to be reassigned: