Skip to content

Commit 799c1ee

Browse files
author
Emmanouil Konstantinidis
committed
Fix more 'jscs' tests
1 parent c960eb1 commit 799c1ee

File tree

6 files changed

+29
-24
lines changed

6 files changed

+29
-24
lines changed

src/js/components/login.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,14 @@ var Login = React.createClass({
5050
if (code) {
5151
self.requestGithubToken(options, code);
5252
} else if (error) {
53-
alert('Oops! Something went wrong and we couldn\'t log you in using Github. Please try again.');
53+
alert('Oops! Something went wrong and we couldn\'t' +
54+
'log you in using Github. Please try again.');
5455
}
5556

5657
});
5758

5859
// If "Done" button is pressed, hide "Loading"
59-
authWindow.on('close', function() {
60+
authWindow.on('close', function () {
6061
authWindow = null;
6162
}, false);
6263

@@ -69,7 +70,7 @@ var Login = React.createClass({
6970
.post('https://github.com/login/oauth/access_token', {
7071
client_id: options.client_id,
7172
client_secret: options.client_secret,
72-
code: code,
73+
code: code
7374
})
7475
.end(function (err, response) {
7576
if (response && response.ok) {

src/js/components/navigation.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ var Navigation = React.createClass({
2323
};
2424
},
2525

26-
componentDidMount: function() {
26+
componentDidMount: function () {
2727
var self = this;
2828
var iFrequency = 60000;
2929
var myInterval = 0;
@@ -45,7 +45,7 @@ var Navigation = React.createClass({
4545
logOut: function () {
4646
Actions.logout();
4747
this.context.router.transitionTo('login');
48-
ipc.sendChannel('update-icon', "IconPlain");
48+
ipc.sendChannel('update-icon', 'IconPlain');
4949
},
5050

5151
appQuit: function () {
@@ -69,7 +69,9 @@ var Navigation = React.createClass({
6969
<div className='container-fluid'>
7070
<div className='row navigation'>
7171
<div className='col-xs-4 left'>{refreshIcon}</div>
72-
<div className='col-xs-4 logo'><img className='img-responsive' src='images/logo-hor-white.png' /></div>
72+
<div className='col-xs-4 logo'>
73+
<img className='img-responsive' src='images/logo-hor-white.png' />
74+
</div>
7375
<div className='col-xs-4 right'>
7476
{logoutIcon}
7577
<i className="fa fa-power-off" onClick={this.appQuit} />

src/js/components/notification.js

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var apiRequests = require('../utils/api-requests');
88

99
var Notification = React.createClass({
1010

11-
getInitialState: function() {
11+
getInitialState: function () {
1212
return {
1313
readClass: 'row notification',
1414
read: false
@@ -17,8 +17,8 @@ var Notification = React.createClass({
1717

1818
openBrowser: function () {
1919
var url = this.props.notification.subject.url.replace('api.github.com/repos', 'www.github.com');
20-
if (url.indexOf("/pulls/") != -1) {
21-
url = url.replace("/pulls/", "/pull/");
20+
if (url.indexOf('/pulls/') != -1) {
21+
url = url.replace('/pulls/', '/pull/');
2222
}
2323
shell.openExternal(url);
2424
},
@@ -45,12 +45,12 @@ var Notification = React.createClass({
4545
render: function () {
4646
var typeIconClass;
4747

48-
if (this.props.notification.subject.type == "Issue") {
49-
typeIconClass = "octicon octicon-issue-opened";
50-
} else if (this.props.notification.subject.type == "PullRequest") {
51-
typeIconClass = "octicon octicon-git-pull-request";
48+
if (this.props.notification.subject.type == 'Issue') {
49+
typeIconClass = 'octicon octicon-issue-opened';
50+
} else if (this.props.notification.subject.type == 'PullRequest') {
51+
typeIconClass = 'octicon octicon-git-pull-request';
5252
} else {
53-
typeIconClass = "octicon octicon-question";
53+
typeIconClass = 'octicon octicon-question';
5454
}
5555

5656
return (
@@ -59,7 +59,9 @@ var Notification = React.createClass({
5959
<div className='col-xs-10 subject' onClick={this.openBrowser}>
6060
{this.props.notification.subject.title}
6161
</div>
62-
<div className='col-xs-1 check-wrapper'><span className='octicon octicon-check' onClick={this.markAsRead} /></div>
62+
<div className='col-xs-1 check-wrapper'>
63+
<span className='octicon octicon-check' onClick={this.markAsRead} />
64+
</div>
6365
</div>
6466
);
6567
}

src/js/components/notifications.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ var Notifications = React.createClass({
1313
mixins: [
1414
Reflux.connect(NotificationsStore, 'notifications'),
1515
Reflux.listenTo(Actions.getNotifications.completed, 'completedNotifications'),
16-
Reflux.listenTo(Actions.getNotifications.failed, 'completedNotifications'),
16+
Reflux.listenTo(Actions.getNotifications.failed, 'completedNotifications')
1717
],
1818

19-
getInitialState: function() {
19+
getInitialState: function () {
2020
return {
2121
notifications: [],
2222
loading: true
2323
};
2424
},
2525

26-
componentWillMount: function() {
26+
componentWillMount: function () {
2727
Actions.getNotifications();
2828
},
2929

@@ -47,7 +47,7 @@ var Notifications = React.createClass({
4747
);
4848
} else {
4949
notifications = (
50-
this.state.notifications.map(function(obj, i) {
50+
this.state.notifications.map(function (obj, i) {
5151
var repoFullName = obj[0].repository.full_name;
5252
return <Repository repo={obj} repoName={repoFullName} key={repoFullName} />;
5353
})

src/js/components/repository.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ var Repository = React.createClass({
2424
<div className='col-xs-10 name' onClick={this.openBrowser}>{this.props.repoName}</div>
2525
</div>
2626

27-
{this.props.repo.map(function(obj, i) {
27+
{this.props.repo.map(function (obj, i) {
2828
return <SingleNotification notification={obj} key={obj.id} />;
2929
})}
3030

src/js/stores/notifications.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ var apiRequests = require('../utils/api-requests');
99
var NotificationsStore = Reflux.createStore({
1010
listenables: Actions,
1111

12-
init: function () {
12+
init: function() {
1313
this._notifications = [];
1414
},
1515

1616
updateTrayIcon: function (notifications) {
1717
if (notifications.length > 0) {
18-
ipc.sendChannel('update-icon', "TrayActive");
18+
ipc.sendChannel('update-icon', 'TrayActive');
1919
} else {
20-
ipc.sendChannel('update-icon', "TrayIdle");
20+
ipc.sendChannel('update-icon', 'TrayIdle');
2121
}
2222
},
2323

@@ -40,7 +40,7 @@ var NotificationsStore = Reflux.createStore({
4040
},
4141

4242
onGetNotificationsCompleted: function (notifications) {
43-
var groupedNotifications = _.groupBy(notifications, function (object){
43+
var groupedNotifications = _.groupBy(notifications, function (object) {
4444
return object.repository.full_name;
4545
});
4646

0 commit comments

Comments
 (0)