From fbe6e37744042e32f2dbf5d9de52237aef8bb0e8 Mon Sep 17 00:00:00 2001 From: Erik Date: Sun, 24 Jul 2016 16:48:07 -0400 Subject: [PATCH] eslint: prevent the use of the `alert` global --- .eslintrc.json | 4 ++-- lib/modules/commandLine.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4bf00e75c6..2178afb4d1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -174,9 +174,9 @@ "no-prototype-builtins": 0, "no-redeclare": 2, "no-regex-spaces": 2, - "no-restricted-globals": 0, + "no-restricted-globals": [2, "alert"], "no-restricted-imports": [2, "jquery"], // import it from vendor/ instead - "no-restricted-modules": 0, + "no-restricted-modules": 0, // see import/no-nodejs-modules "no-restricted-syntax": [2, "ForStatement"], // use for..of or Array.prototype methods "no-return-assign": 2, "no-script-url": 2, diff --git a/lib/modules/commandLine.js b/lib/modules/commandLine.js index a3d9c97872..492310220b 100644 --- a/lib/modules/commandLine.js +++ b/lib/modules/commandLine.js @@ -444,7 +444,7 @@ registerCommand('userinfo', false, if (val.length <= 1) { return 'No username specified.'; } else { - ajax({ url: string.encode`/user/${val}/about.json` }).then(alert); + ajax({ url: string.encode`/user/${val}/about.json` }).then(Alert.open); } } );