Skip to content

Commit 36e94cd

Browse files
Merge pull request #38 from ekonstantinidis/cc-issues
Fix code climate issues
2 parents dd20920 + 474509a commit 36e94cd

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

main.js

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var iconIdle = path.join(__dirname, 'images', 'tray-idleTemplate.png');
1212
var iconActive = path.join(__dirname, 'images', 'tray-active.png');
1313

1414
app.on('ready', function(){
15-
appIcon = new Tray(iconIdle);
15+
var appIcon = new Tray(iconIdle);
1616
initWindow();
1717

1818
appIcon.on('clicked', function clicked (e, bounds) {
@@ -68,29 +68,28 @@ app.on('ready', function(){
6868
]
6969
}];
7070

71-
menu = Menu.buildFromTemplate(template);
71+
var menu = Menu.buildFromTemplate(template);
7272
Menu.setApplicationMenu(menu);
7373
}
7474

7575
function hideWindow () {
76-
if (!appIcon.window) return;
76+
if (!appIcon.window) { return; }
7777
appIcon.window.hide();
7878
}
7979

80-
ipc.on('reopen-window', function(event) {
80+
ipc.on('reopen-window', function() {
8181
appIcon.window.show();
8282
});
8383

8484
ipc.on('update-icon', function(event, arg) {
85-
var icon;
86-
if (arg == "TrayActive") {
85+
if (arg === "TrayActive") {
8786
appIcon.setImage(iconActive);
8887
} else {
8988
appIcon.setImage(iconIdle);
9089
}
9190
});
9291

93-
ipc.on('app-quit', function(event) {
92+
ipc.on('app-quit', function() {
9493
app.quit();
9594
});
9695

src/js/__tests__/__mocks__/superagent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ superagent.mockError = null;
4747
superagent.mockDelay = false;
4848

4949
function __setResponse (status, ok, body, error) {
50-
var mockedResponse = jest.genMockFunction().mockImplementation(function () {
50+
var MockedResponse = jest.genMockFunction().mockImplementation(function () {
5151
this.status = status;
5252
this.ok = ok;
5353
this.body = body;
@@ -59,7 +59,7 @@ function __setResponse (status, ok, body, error) {
5959
}
6060
};
6161

62-
superagent.mockResponse = new mockedResponse();
62+
superagent.mockResponse = new MockedResponse();
6363
}
6464

6565
module.exports = {

src/js/stores/notifications.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ var _ = require('underscore');
33

44
var Reflux = require('reflux');
55
var Actions = require('../actions/actions');
6-
var AuthStore = require('../stores/auth');
76
var apiRequests = require('../utils/api-requests');
87

98
var NotificationsStore = Reflux.createStore({

0 commit comments

Comments
 (0)