]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/rules/no-param-reassign.js
import 8.41.0 source
[pve-eslint.git] / eslint / lib / rules / no-param-reassign.js
index f89435c867576f7a44cabe44d214c045b59cbc9a..607cafd38372bb83e142b410efcabe6e7806ac12 100644 (file)
@@ -18,7 +18,7 @@ module.exports = {
         docs: {
             description: "Disallow reassigning `function` parameters",
             recommended: false,
-            url: "https://eslint.org/docs/rules/no-param-reassign"
+            url: "https://eslint.org/docs/latest/rules/no-param-reassign"
         },
 
         schema: [
@@ -70,6 +70,7 @@ module.exports = {
         const props = context.options[0] && context.options[0].props;
         const ignoredPropertyAssignmentsFor = context.options[0] && context.options[0].ignorePropertyModificationsFor || [];
         const ignoredPropertyAssignmentsForRegex = context.options[0] && context.options[0].ignorePropertyModificationsForRegex || [];
+        const sourceCode = context.sourceCode;
 
         /**
          * Checks whether or not the reference modifies properties of its variable.
@@ -214,7 +215,7 @@ module.exports = {
          * @returns {void}
          */
         function checkForFunction(node) {
-            context.getDeclaredVariables(node).forEach(checkVariable);
+            sourceCode.getDeclaredVariables(node).forEach(checkVariable);
         }
 
         return {