From c532ea477089ec7f2c3ffdbe38ba750f190151c6 Mon Sep 17 00:00:00 2001 From: Peter deHaan Date: Wed, 21 Jun 2017 14:31:21 -0700 Subject: [PATCH] Auto-format files using 'npm run format' --- frontend/src/fileSender.js | 2 +- frontend/src/upload.js | 2 +- frontend/src/utils.js | 7 +++---- server/portal_server.js | 11 +++++++---- views/download.handlebars | 2 +- views/index.handlebars | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/frontend/src/fileSender.js b/frontend/src/fileSender.js index 1651147b..8a70c2f9 100644 --- a/frontend/src/fileSender.js +++ b/frontend/src/fileSender.js @@ -23,7 +23,7 @@ class FileSender extends EventEmitter { } if (xhr.status === 200) { - console.log('The file was successfully deleted.') + console.log('The file was successfully deleted.'); } else { console.log('The file has expired, or has already been deleted.'); } diff --git a/frontend/src/upload.js b/frontend/src/upload.js index 6e0a655d..7aa520f2 100644 --- a/frontend/src/upload.js +++ b/frontend/src/upload.js @@ -1,5 +1,5 @@ const FileSender = require('./fileSender'); -const { notify } = require('./utils') +const { notify } = require('./utils'); const $ = require('jquery'); $(document).ready(function() { diff --git a/frontend/src/utils.js b/frontend/src/utils.js index b5ea5563..e17534fa 100644 --- a/frontend/src/utils.js +++ b/frontend/src/utils.js @@ -24,12 +24,11 @@ function notify(str) { if (!('Notification' in window)) { return; } else if (Notification.permission === 'granted') { - new Notification(str) + new Notification(str); } else if (Notification.permission !== 'denied') { Notification.requestPermission(function(permission) { - if (permission === 'granted') - new Notification(str); - }) + if (permission === 'granted') new Notification(str); + }); } } diff --git a/server/portal_server.js b/server/portal_server.js index 1a8dd87b..e2a00356 100644 --- a/server/portal_server.js +++ b/server/portal_server.js @@ -16,10 +16,13 @@ const log = mozlog('portal.server'); const app = express(); -app.engine('handlebars', exphbs({ - defaultLayout: 'main', - partialsDir: 'views/partials/' -})); +app.engine( + 'handlebars', + exphbs({ + defaultLayout: 'main', + partialsDir: 'views/partials/' + }) +); app.set('view engine', 'handlebars'); app.use(helmet()); diff --git a/views/download.handlebars b/views/download.handlebars index ce7c2a90..edf7911c 100644 --- a/views/download.handlebars +++ b/views/download.handlebars @@ -4,7 +4,7 @@ Download your file - + {{#if shouldRenderAnalytics}} {{> analytics trackerId=trackerId}} diff --git a/views/index.handlebars b/views/index.handlebars index 8b881424..fd382819 100644 --- a/views/index.handlebars +++ b/views/index.handlebars @@ -4,7 +4,7 @@ Firefox Fileshare - + {{#if shouldRenderAnalytics}} {{> analytics trackerId=trackerId}}