From 73d4023155c0ea7f00d9b2f54f8acc7b0d772681 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Mon, 13 Apr 2020 15:46:07 +0200 Subject: [PATCH] note/actions.ts: Formatting fixes and lint exceptions Signed-off-by: David Mehren --- lib/web/note/actions.ts | 11 +++++++---- package.json | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/web/note/actions.ts b/lib/web/note/actions.ts index f66eff111..7d90fe196 100644 --- a/lib/web/note/actions.ts +++ b/lib/web/note/actions.ts @@ -33,7 +33,9 @@ export function getInfo (req: any, res: Response, note: Note): void { export function createGist (req: any, res: Response, note: Note): void { const data = { + // eslint-disable-next-line @typescript-eslint/camelcase client_id: config.github.clientID, + // eslint-disable-next-line @typescript-eslint/camelcase redirect_uri: config.serverURL + '/auth/github/callback/' + Note.encodeNoteId(note.id) + '/gist', scope: 'gist', state: shortId.generate() @@ -52,10 +54,12 @@ export function getRevision (req: any, res: Response, note: Note): void { logger.error(err) errors.errorInternalError(res) - return - }if (!content) { + return + } + if (!content) { errors.errorNotFound(res) - return} + return + } res.set({ 'Access-Control-Allow-Origin': '*', // allow CORS as API 'Access-Control-Allow-Headers': 'Range', @@ -67,7 +71,6 @@ export function getRevision (req: any, res: Response, note: Note): void { }) } else { errors.errorNotFound(res) - return } } else { Revision.getNoteRevisions(note, function (err, data) { diff --git a/package.json b/package.json index ff6ac389d..d9a37831b 100644 --- a/package.json +++ b/package.json @@ -219,6 +219,7 @@ "script-loader": "^0.7.2", "string-loader": "^0.0.1", "style-loader": "^1.0.0", + "ts-node": "^8.8.2", "typescript": "^3.7.2", "url-loader": "^2.3.0", "webpack": "^4.41.2",