lint: Fix several no-unused-vars eslint rule violations.

These changes were extracted by tabbott from the original commit
to merge now because they have been reviewed as safe.
This commit is contained in:
Rafid Aslam 2016-12-02 20:06:06 +07:00 committed by Tim Abbott
parent 426cb13e23
commit 0290aeb6ab
11 changed files with 1 additions and 19 deletions

View File

@ -8,8 +8,6 @@
// Provides a few utility functions.
// See http://casperjs.org/api.html#utils
// For example, utils.dump() prints an Object with nice formatting.
var utils = require('utils');
var common = require('../casper_lib/common.js').common;
common.start_and_log_in();

View File

@ -1,5 +1,4 @@
var common = require('../casper_lib/common.js').common;
var test_credentials = require('../../var/casper/test_credentials.js').test_credentials;
var stream_name = "Scotland";
common.start_and_log_in();

View File

@ -24,11 +24,8 @@ i18n.init({
});
var jsdom = require("jsdom");
var fs = require("fs");
var path = require("path");
var window = jsdom.jsdom().defaultView;
global.$ = require('jquery')(window);
var _ = global._;
(function test_t_tag() {
var args = {

View File

@ -35,7 +35,6 @@ $.fn.expectOne = function () {
global.compile_template('user_presence_row');
global.compile_template('user_presence_rows');
var people = require("js/people.js");
var activity = require('js/activity.js');
// TODO: de-dup with activity.js

View File

@ -1,5 +1,4 @@
var assert = require('assert');
var _ = global._;
add_dependencies({
util: 'js/util.js',
@ -26,8 +25,6 @@ set_global('reload', {
is_in_progress: function () {return false;},
});
var page_params = global.page_params;
set_global('echo', {
process_from_server: function (messages) {
return messages;

View File

@ -22,8 +22,6 @@ i18n.init({
});
var jsdom = require("jsdom");
var fs = require("fs");
var path = require("path");
var window = jsdom.jsdom().defaultView;
global.$ = require('jquery')(window);
var _ = global._;

View File

@ -3,7 +3,6 @@ var render = (function () {
var exports = {};
var fs = require('fs');
var path = require("path");
var _ = require('third/underscore/underscore.js');
var Handlebars = require('handlebars');

View File

@ -306,7 +306,7 @@ exports.update_users = function (user_list) {
var user_info = _.map(users, info_for);
if (user_list !== undefined) {
// Render right panel partially
_.each(user_info, function (user, index) {
_.each(user_info, function (user) {
var user_index = all_users.indexOf(user.user_id);
$('#user_presences').find('[data-user-id="' + user.user_id + '"]').remove();
$('#user_presences li').eq(user_index).before(templates.render('user_presence_row', user));

View File

@ -24,8 +24,6 @@ exports.process_message = function (message) {
var after_punctuation = '\\s|$|<|[\\)\\"\\?!:.,\';\\]!]';
var word_in_href = new RegExp(find_href_backwards + word, 'i');
var regex = new RegExp('(' + before_punctuation + ')' +
'(' + clean + ')' +
'(' + after_punctuation + ')' , 'ig');

View File

@ -9,7 +9,6 @@
*
*/
function Dict(opts) {
var self = this;
this._items = {};
this._opts = _.extend({}, {fold_case: false}, opts);
}
@ -84,7 +83,6 @@ Dict.prototype = {
// If `key` exists in the Dict, return its value. Otherwise
// insert `key` with a value of `value` and return `value`.
setdefault: function Dict_setdefault(key, value) {
var ret;
var mapping = this._items[this._munge(key)];
if (mapping === undefined) {
return this.set(key, value);

View File

@ -42,7 +42,6 @@ exports.lower_bound = function (array, arg1, arg2, arg3, arg4) {
var len = last - first;
var middle;
var step;
var lower = 0;
while (len > 0) {
step = Math.floor(len / 2);
middle = first + step;