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:
@@ -51,8 +51,7 @@ export class HooksController {
|
||||
return this._removeHooks({ className: className, triggerName: triggerName });
|
||||
}
|
||||
|
||||
_getHooks(query = {}, limit) {
|
||||
let options = limit ? { limit: limit } : undefined;
|
||||
_getHooks(query = {}) {
|
||||
return this.database.find(DefaultHooksCollectionName, query).then((results) => {
|
||||
return results.map((result) => {
|
||||
delete result.objectId;
|
||||
@@ -113,7 +112,7 @@ export class HooksController {
|
||||
}
|
||||
|
||||
return this.addHook(hook);
|
||||
};
|
||||
}
|
||||
|
||||
createHook(aHook) {
|
||||
if (aHook.functionName) {
|
||||
@@ -134,7 +133,7 @@ export class HooksController {
|
||||
}
|
||||
|
||||
throw new Parse.Error(143, "invalid hook declaration");
|
||||
};
|
||||
}
|
||||
|
||||
updateHook(aHook) {
|
||||
if (aHook.functionName) {
|
||||
@@ -153,7 +152,7 @@ export class HooksController {
|
||||
});
|
||||
}
|
||||
throw new Parse.Error(143, "invalid hook declaration");
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function wrapToHTTPRequest(hook, key) {
|
||||
@@ -170,7 +169,7 @@ function wrapToHTTPRequest(hook, key) {
|
||||
jsonBody.original = req.original.toJSON();
|
||||
jsonBody.original.className = req.original.className;
|
||||
}
|
||||
let jsonRequest = {
|
||||
let jsonRequest: any = {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user