Adds liniting into the workflow (#3082)

* initial linting of src

* fix indent to 2 spaces

* Removes unnecessary rules

* ignore spec folder for now

* Spec linting

* Fix spec indent

* nits

* nits

* no no-empty rule
This commit is contained in:
Florent Vilmart
2016-11-24 15:47:41 -05:00
committed by GitHub
parent 6e2fba4ae4
commit 8c2c76dd26
149 changed files with 3478 additions and 3507 deletions

View File

@@ -128,7 +128,7 @@ describe('OAuth', function() {
var path = "/";
var oauthClient = new OAuth(options);
oauthClient.post(path, null, body).then(function(data){
oauthClient.post(path, null, body).then(function(){
jequal(false, true);
done();
}).catch(function(){
@@ -192,7 +192,7 @@ describe('OAuth', function() {
};
};
var ExtendedUser = Parse.User.extend({
Parse.User.extend({
extended: function() {
return true;
}
@@ -206,13 +206,13 @@ describe('OAuth', function() {
};
var options = {
headers: {'X-Parse-Application-Id': 'test',
'X-Parse-REST-API-Key': 'rest',
'X-Parse-Installation-Id': 'yolo',
'Content-Type': 'application/json' },
url: 'http://localhost:8378/1/users',
body: JSON.stringify(jsonBody)
};
headers: {'X-Parse-Application-Id': 'test',
'X-Parse-REST-API-Key': 'rest',
'X-Parse-Installation-Id': 'yolo',
'Content-Type': 'application/json' },
url: 'http://localhost:8378/1/users',
body: JSON.stringify(jsonBody)
};
return request.post(options, callback);
}
@@ -227,15 +227,15 @@ describe('OAuth', function() {
var sessionToken = b.sessionToken;
var q = new Parse.Query("_Session");
q.equalTo('sessionToken', sessionToken);
q.first({useMasterKey: true}).then((res) => {
q.first({useMasterKey: true}).then((res) => {
if (!res) {
fail('should not fail fetching the session');
done();
return;
fail('should not fail fetching the session');
done();
return;
}
expect(res.get("installationId")).toEqual('yolo');
done();
}).fail((err) => {
}).fail(() => {
fail('should not fail fetching the session');
done();
})
@@ -305,20 +305,20 @@ describe('OAuth', function() {
"User should be linked to myoauth");
done();
},
error: function(model, error) {
error: function() {
ok(false, "linking again should succeed");
done();
}
});
});
},
error: function(model, error) {
error: function() {
ok(false, "unlinking should succeed");
done();
}
});
},
error: function(model, error) {
error: function() {
ok(false, "linking should have worked");
done();
}