Reports an error when they encounter an attempt to assign a value to built-in native object.
String = "hello world";
The native objects reported by this rule are the builtin
variables from globals.
Examples of incorrect code for this rule:
/*eslint no-native-reassign: "error"*/
String = new Object();
This rule accepts an exceptions
option, which can be used to specify a list of builtins for which reassignments will be allowed:
{
"rules": {
"no-native-reassign": ["error", {"exceptions": ["Object"]}]
}
}
If you are trying to override one of the native objects.