]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/rules/no-native-reassign.js
import 8.23.1 source
[pve-eslint.git] / eslint / lib / rules / no-native-reassign.js
index 1814a5b3c5b6ccbd11b74a9e8d6db6ae014c3b2b..634fea93308d5e6a7cdee5a0b2e5d6ab84187367 100644 (file)
@@ -16,7 +16,7 @@ module.exports = {
         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"
         },
@@ -81,7 +81,7 @@ module.exports = {
          * @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);
             }
         }