From 2d87ec9a64b521807786f476dfe1b7a555b43e4b Mon Sep 17 00:00:00 2001 From: Jon Tewksbury Date: Tue, 3 Nov 2015 15:04:26 -0800 Subject: [PATCH] Add eslint no-undef rule and resolve errors --- js/.eslintrc | 5 +++-- js/src/modal.js | 2 +- js/src/tooltip.js | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/js/.eslintrc b/js/.eslintrc index 9c66e07332..b8c38b3428 100644 --- a/js/.eslintrc +++ b/js/.eslintrc @@ -2,7 +2,8 @@ "root": true, "parser": "babel-eslint", "env": { - "browser": true + "browser": true, + "jquery": true }, "rules": { @@ -98,7 +99,7 @@ "no-label-var": 2, "no-shadow": 0, "no-shadow-restricted-names": 2, - "no-undef": 0, + "no-undef": 2, "no-undefined": 0, "no-undef-init": 2, "no-unused-vars": 2, diff --git a/js/src/modal.js b/js/src/modal.js index 99a49f148f..a5f0160c9c 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -138,7 +138,7 @@ const Modal = (($) => { $(this._dialog).on(Event.MOUSEDOWN_DISMISS, () => { $(this._element).one(Event.MOUSEUP_DISMISS, (event) => { if ($(event.target).is(this._element)) { - that._ignoreBackdropClick = true + this._ignoreBackdropClick = true } }) }) diff --git a/js/src/tooltip.js b/js/src/tooltip.js index b80bd8e8c9..749e42379b 100644 --- a/js/src/tooltip.js +++ b/js/src/tooltip.js @@ -1,3 +1,5 @@ +/* global Tether */ + import Util from './util'