Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Commit 2ee93f8

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master' into pr/1555
# Conflicts: # js/start.js # js/templates/appBar.html # js/views/settingsVw.js
1 parent 6bcd3dc commit 2ee93f8

File tree

117 files changed

+1985
-2055
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+1985
-2055
lines changed

.eslintrc

Lines changed: 92 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,108 @@
11
{
22
"root": true,
33
"extends": "eslint:recommended",
4-
"parser": "babel-eslint",
4+
"parser": "esprima",
55
"parserOptions": {
66
"ecmaVersion": 6
77
},
88
"rules": {
9-
"quotes": 0,
10-
"curly": [1, "multi-line"],
9+
"accessor-pairs": 1,
10+
"array-callback-return": 2,
11+
"block-scoped-var": 1,
12+
"brace-style": 1,
13+
"curly": [2, "multi-line"],
1114
"camelcase": 0,
1215
"comma-dangle": 0,
16+
"comma-spacing": [2, { "before": false, "after": true }],
17+
"comma-style": [2, "last"],
18+
"consistent-this": [2, "self"],
19+
"dot-location": [2, "property"],
1320
"dot-notation": 0,
21+
"eqeqeq": 0,
22+
"indent": [1, 2, { "VariableDeclarator": { "var": 2, "let": 2, "const": 3 } }],
23+
"guard-for-in": 2,
24+
"key-spacing": [1, {
25+
"singleLine": {
26+
"beforeColon": false,
27+
"afterColon": true
28+
},
29+
"multiLine": {
30+
"beforeColon": false,
31+
"afterColon": true,
32+
"mode": "minimum"
33+
}}],
34+
"keyword-spacing": 1,
35+
"no-caller": 2,
36+
"no-cond-assign": 2,
1437
"no-console": 0,
15-
"no-use-before-define": [1, "nofunc"],
38+
"no-control-regex": 2,
39+
"no-debugger": 2,
40+
"no-dupe-args": 2,
41+
"no-dupe-keys": 2,
42+
"no-duplicate-case": 2,
43+
"no-else-return": 2,
44+
"no-empty": 2,
45+
"no-empty-character-class": 2,
46+
"no-empty-function": 2,
47+
"no-eq-null": 2,
48+
"no-eval": 2,
49+
"no-ex-assign": 2,
50+
"no-extend-native": 2,
51+
"no-extra-bind": 2,
52+
"no-extra-boolean-cast": 2,
53+
"no-extra-parens": [2, "all", {"nestedBinaryExpressions": false}],
54+
"no-extra-semi": 2,
55+
"no-fallthrough": 2,
56+
"no-floating-decimal": 2,
57+
"no-func-assign": 2,
58+
"no-implicit-globals": 2,
59+
"no-implied-eval": 2,
60+
"no-invalid-regexp": 2,
61+
"no-irregular-whitespace": 2,
62+
"no-iterator": 2,
63+
"no-label-var": 2,
64+
"no-loop-func": 2,
65+
"no-lone-blocks": 2,
66+
"no-mixed-spaces-and-tabs": 2,
67+
"no-multi-spaces": 1,
68+
"no-multi-str": 2,
69+
"no-multiple-empty-lines": [1, {"max": 2}],
70+
"no-native-reassign": 2,
71+
"no-negated-in-lhs": 2,
72+
//"no-new": 2,
73+
"no-new-func": 2,
74+
"no-new-wrappers": 2,
75+
"no-obj-calls": 2,
76+
"no-octal": 2,
77+
"no-octal-escape": 2,
78+
"no-proto": 2,
79+
"no-redeclare": 2,
80+
"no-regex-spaces": 2,
81+
"no-self-assign": 2,
82+
"no-self-compare": 2,
83+
"no-shadow-restricted-names": 2,
84+
"no-undef": 2,
85+
"no-undef-init": 2,
86+
"no-undefined": 1,
1687
"no-underscore-dangle": 0,
17-
"no-unused-vars": 0,
88+
"no-unexpected-multiline": 2,
89+
"no-unneeded-ternary": 2,
90+
"no-unreachable": 2,
91+
"no-unsafe-finally": 2,
92+
"no-unused-labels": 2,
93+
"no-unused-vars": [2, { "varsIgnorePattern": "cropit|chosen|mCustomScrollbar|mouseWheel|colpicker" }],
94+
"no-use-before-define": [2, "nofunc"],
95+
"no-useless-concat": 2,
96+
"no-useless-escape": 2,
97+
"no-with": 2,
1898
"new-cap": 0,
19-
"semi": [1, "always"]
99+
//"quotes": ["error", "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
100+
"semi": [1, "always"],
101+
"strict": 2,
102+
"use-isnan": 2,
103+
"valid-jsdoc": 2,
104+
"valid-typeof": 2,
105+
"yoda": 2
20106
},
21107
"env": {
22108
"browser": true,

.jshintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.jshintrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"node": true,
3+
4+
"curly": true,
5+
"latedef": true,
6+
"quotmark": true,
7+
"undef": true,
8+
"unused": true,
9+
"trailing": true
10+
}

js/App.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
'use strict';
2+
13
var ipcRenderer = require('ipc-renderer'),
2-
__ = require('underscore'),
34
$ = require('jquery'),
45
Socket = require('./utils/Socket'),
56
_app;
@@ -10,7 +11,7 @@ function App() {
1011
// ensure we're a singleton
1112
if (_app) return _app;
1213

13-
_app = this;
14+
_app = self;
1415
this._awayCounts = null;
1516
this._notifUnread = 0;
1617
this._chatMessagesUnread = 0;
@@ -77,7 +78,7 @@ App.prototype.getGuid = function(handle, resolver) {
7778
} else {
7879
deferred.reject();
7980
}
80-
}).fail(function(jqXHR, status, errorThrown){
81+
}).fail(function(){
8182
deferred.reject();
8283
});
8384

js/collections/chatConversationsCl.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var Backbone = require('backbone'),
24
app = require('../App.js').getApp(),
35
ChatConversationMd = require('../models/chatConversationMd');
@@ -10,12 +12,12 @@ module.exports = Backbone.Collection.extend({
1012
model: ChatConversationMd,
1113

1214
initialize: function() {
13-
this.on('change:unread', function(model){
15+
this.on('change:unread', function(model){
1416
// Only re-sort collection if unread count was incremented
15-
if (model.hasChanged('unread') && model.get('unread') > 0) {
16-
this.sort();
17-
}
18-
});
17+
if (model.hasChanged('unread') && model.get('unread') > 0) {
18+
this.sort();
19+
}
20+
});
1921
},
2022

2123
comparator: function(a, b) {

js/collections/chatMessagesCl.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var Backbone = require('backbone'),
24
app = require('../App.js').getApp(),
35
ChatMessageMd = require('../models/chatMessageMd');
@@ -11,8 +13,5 @@ module.exports = Backbone.Collection.extend({
1113

1214
comparator: function(msg) {
1315
return msg.get('timestamp');
14-
},
15-
16-
initialize: function(options) {
1716
}
1817
});

js/collections/chooseCountryCl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
var Backbone = require('backbone'),
24
ChooseCountry = require('../models/chooseCountryMd');
35

js/collections/chooseCurrencyCl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
/* this reuses the country model */
24

35
var Backbone = require('backbone'),

js/collections/chooseLanguageCl.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use strict';
2+
13
/* this reuses the country model */
24

35
var Backbone = require('backbone'),

js/collections/discussionCl.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
'use strict';
2+
13
var Backbone = require('backbone'),
24
chatMessage = require('../models/chatMessageMd');
35

46

57
module.exports = Backbone.Collection.extend({
68

7-
model: chatMessage,
8-
9-
initialize: function(options) {
10-
}
9+
model: chatMessage
1110

1211
});

0 commit comments

Comments
 (0)