type: "suggestion",
docs: {
- description: "disallow assignments to native objects or read-only global variables",
+ description: "Disallow assignments to native objects or read-only global variables",
recommended: false,
url: "https://eslint.org/docs/rules/no-native-reassign"
},
* @returns {void}
*/
function checkVariable(variable) {
- if (variable.writeable === false && exceptions.indexOf(variable.name) === -1) {
+ if (variable.writeable === false && !exceptions.includes(variable.name)) {
variable.references.forEach(checkReference);
}
}