From 7251f745cd2599106815731c6132666b5af04125 Mon Sep 17 00:00:00 2001 From: Chris Hallberg <crhallberg@gmail.com> Date: Mon, 13 Jun 2016 16:17:53 -0400 Subject: [PATCH] eslint env:browser to cover all built-in globals. --- .eslintrc.js | 7 ++----- themes/bootstrap3/js/autocomplete.js | 1 - themes/bootstrap3/js/cart.js | 2 +- themes/bootstrap3/js/check_save_statuses.js | 2 +- themes/bootstrap3/js/common.js | 2 +- themes/bootstrap3/js/embedded_record.js | 2 +- themes/bootstrap3/js/lightbox.js | 2 +- 7 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 72d76420fe6..2c0894535d0 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,10 +1,7 @@ module.export = { extends: "eslint:recommended", - globals: { - "$": false, - "document": false, - "window": false - }, + env: { "browser": true }, + globals: { "$": false }, rules: { // errors "block-scoped-var": "error", diff --git a/themes/bootstrap3/js/autocomplete.js b/themes/bootstrap3/js/autocomplete.js index 7055637f15e..731b6b63c36 100644 --- a/themes/bootstrap3/js/autocomplete.js +++ b/themes/bootstrap3/js/autocomplete.js @@ -1,4 +1,3 @@ -/*global jQuery, window, document, console, setTimeout, clearTimeout */ /** * crhallberg/autocomplete.js 0.15.1 * ~ @crhallberg diff --git a/themes/bootstrap3/js/cart.js b/themes/bootstrap3/js/cart.js index c70291916eb..dd768ea40c1 100644 --- a/themes/bootstrap3/js/cart.js +++ b/themes/bootstrap3/js/cart.js @@ -1,4 +1,4 @@ -/*global Cookies, VuFind, setTimeout, clearTimeout */ +/*global Cookies, VuFind */ /*exported cartFormHandler */ VuFind.register('cart', function Cart() { diff --git a/themes/bootstrap3/js/check_save_statuses.js b/themes/bootstrap3/js/check_save_statuses.js index 3a3ca5512e1..411b88d8cec 100644 --- a/themes/bootstrap3/js/check_save_statuses.js +++ b/themes/bootstrap3/js/check_save_statuses.js @@ -1,4 +1,4 @@ -/*global htmlEncode, VuFind, userIsLoggedIn */ +/*global htmlEncode, userIsLoggedIn, VuFind */ function checkSaveStatuses(_container) { if (!userIsLoggedIn) { diff --git a/themes/bootstrap3/js/common.js b/themes/bootstrap3/js/common.js index 897e38d6993..54b42de9d8c 100644 --- a/themes/bootstrap3/js/common.js +++ b/themes/bootstrap3/js/common.js @@ -1,4 +1,4 @@ -/*global isPhoneNumberValid, unescape */ +/*global isPhoneNumberValid */ /*exported VuFind, htmlEncode, deparam, moreFacets, lessFacets, phoneNumberFormHandler, bulkFormHandler */ // IE 9< console polyfill diff --git a/themes/bootstrap3/js/embedded_record.js b/themes/bootstrap3/js/embedded_record.js index 7e95b5f46d4..51e7f0cb04b 100644 --- a/themes/bootstrap3/js/embedded_record.js +++ b/themes/bootstrap3/js/embedded_record.js @@ -1,4 +1,4 @@ -/*global checkSaveStatuses, sessionStorage, registerAjaxCommentRecord, registerTabEvents, syn_get_widget, VuFind */ +/*global checkSaveStatuses, registerAjaxCommentRecord, registerTabEvents, syn_get_widget, VuFind */ VuFind.register('embedded', function embedded() { var _STORAGEKEY = 'vufind_search_open'; var _SEPERATOR = ':::'; diff --git a/themes/bootstrap3/js/lightbox.js b/themes/bootstrap3/js/lightbox.js index 6e1ccda0ab0..5cfcf60d182 100644 --- a/themes/bootstrap3/js/lightbox.js +++ b/themes/bootstrap3/js/lightbox.js @@ -1,4 +1,4 @@ -/*global $, document, CustomEvent, VuFind, window */ +/*global VuFind */ VuFind.register('lightbox', function Lightbox() { // State var _originalUrl = false; -- GitLab