Update ESLint config and define globals

This commit is contained in:
Alex Gibson 2016-03-03 10:59:26 +00:00
Родитель 0fe338c2d9
Коммит 1464b4e2e8
17 изменённых файлов: 39 добавлений и 1 удалений

2
.eslintignore Normal file
Просмотреть файл

@ -0,0 +1,2 @@
/media/js/styleguide/logo-prototype/vendor/
/media/js/plugincheck/lib/mustache.js

Просмотреть файл

@ -23,5 +23,9 @@ module.exports = {
2,
"always"
]
},
"globals": {
"Mozilla": true,
"site": true
}
};

Просмотреть файл

@ -1,3 +1,5 @@
/* exported _dntEnabled */
/**
* Returns true or false based on whether doNotTack is enabled. It also takes into account the
* anomalies, such as !bugzilla 887703, which effect versions of Fx 31 and lower. It also handles

Просмотреть файл

@ -1,3 +1,6 @@
/* global init_download_links, init_mobile_download_links,
update_download_text_for_old_fx, init_lang_switcher */
// init global.js functions
$(document).ready(function() {
init_download_links();

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* exported trigger_ie_download, init_download_links, update_download_text_for_old_fx,
init_mobile_download_links, init_lang_switcher */
// download buttons

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global YT */
// YouTube API hook has to be in global scope
function onYouTubeIframeAPIReady() {
'use strict';

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global YT */
// YouTube API hook has to be in global scope
// Videos are not yet ready for the whatsnew features (Performance Tools

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global YT */
// YouTube API hook has to be in global scope
function onYouTubeIframeAPIReady() {
Mozilla.firstRunOnYouTubeIframeAPIReady();

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global L */
$(document).ready(function() {
var map = null;
var circle = null;

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global Waypoint */
;(function($) {
'use strict';

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global L */
(function($) {
'use strict';

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global Spinner */
$(function () {
'use strict';

Просмотреть файл

@ -1,3 +1,6 @@
/* global PluginCheck, Mustache, vulnerablePluginsTmpl, outdatedPluginsTmpl,
unknownPluginsTmpl, upToDatePluginsTmpl */
$(function() {
'use strict';

Просмотреть файл

@ -1,3 +1,5 @@
/* exported versionCompare */
/**
* Compares two software version numbers (e.g. "1.7.1" or "1.2b").
*

Просмотреть файл

@ -1,3 +1,6 @@
/* exported vulnerablePluginsTmpl, outdatedPluginsTmpl, unknownPluginsTmpl,
upToDatePluginsTmpl */
var vulnerablePluginsTmpl = '{{#vulnerablePlugins}} <tr><th scope="row">' +
'<img class="icon" width="60" height="60" src="{{icon}}" alt="" />' +
'{{plugin_name}}' +

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global mina, Snap */
;(function($) {
'use strict';

Просмотреть файл

@ -2,6 +2,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* global Waypoint, Circles */
;(function($) {
'use strict';
@ -237,4 +239,3 @@
});
})(window.jQuery);