]> git.proxmox.com Git - pve-eslint.git/blobdiff - eslint/lib/rules/no-alert.js
import 8.41.0 source
[pve-eslint.git] / eslint / lib / rules / no-alert.js
index ba0125c877b03022b0451f49d576a6eea916d482..cc8728565015c0d08fb8ebf868bbc526c8f561ce 100644 (file)
@@ -90,7 +90,7 @@ module.exports = {
         docs: {
             description: "Disallow the use of `alert`, `confirm`, and `prompt`",
             recommended: false,
-            url: "https://eslint.org/docs/rules/no-alert"
+            url: "https://eslint.org/docs/latest/rules/no-alert"
         },
 
         schema: [],
@@ -101,10 +101,12 @@ module.exports = {
     },
 
     create(context) {
+        const sourceCode = context.sourceCode;
+
         return {
             CallExpression(node) {
                 const callee = skipChainExpression(node.callee),
-                    currentScope = context.getScope();
+                    currentScope = sourceCode.getScope(node);
 
                 // without window.
                 if (callee.type === "Identifier") {