From 7f0f8f2d9f1d9b2ae29177310cf9660293024629 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 18 May 2020 15:46:38 +0100 Subject: [PATCH] lint --- packages/server/package.json | 3 ++- packages/server/scripts/jestSetup.js | 2 +- packages/server/src/api/index.js | 2 +- packages/server/src/app.js | 14 ++++++++------ 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/server/package.json b/packages/server/package.json index d5bf50206a..95990ac88f 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -10,6 +10,7 @@ "build": { "appId": "com.budibase.builder", "productName": "Budibase Builder", + "afterSign": "electron-builder-notarize", "mac": { "category": "public.app-category.developer-tools", "hardenedRuntime": true @@ -29,7 +30,7 @@ "budi": "node ../cli/bin/budi", "dev:builder": "nodemon ../cli/bin/budi run", "electron": "electron src/electron.js", - "build:electron": "electron-builder", + "build:electron": "electron-builder --dir", "publish:electron": "electron-builder -mwl --publish always", "postinstall": "electron-builder install-app-deps", "lint": "eslint --fix src/" diff --git a/packages/server/scripts/jestSetup.js b/packages/server/scripts/jestSetup.js index ade3fe59d4..5289aef9f4 100644 --- a/packages/server/scripts/jestSetup.js +++ b/packages/server/scripts/jestSetup.js @@ -4,4 +4,4 @@ process.env.NODE_ENV = "jest" process.env.JWT_SECRET = "test-jwtsecret" process.env.CLIENT_ID = "test-client-id" process.env.BUDIBASE_DIR = tmpdir("budibase-unittests") -process.env.ADMIN_SECRET = "test-admin-secret" \ No newline at end of file +process.env.ADMIN_SECRET = "test-admin-secret" diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index 3380fce9ee..176eaaff96 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -48,7 +48,7 @@ router.use(async (ctx, next) => { try { await next() } catch (err) { - ctx.log.error(err); + ctx.log.error(err) ctx.status = err.status || err.statusCode || 500 ctx.body = { message: err.message, diff --git a/packages/server/src/app.js b/packages/server/src/app.js index cf61340bb3..bec5f8d16e 100644 --- a/packages/server/src/app.js +++ b/packages/server/src/app.js @@ -10,12 +10,14 @@ const app = new Koa() // set up top level koa middleware app.use(koaBody({ multipart: true })) -app.use(logger({ - prettyPrint: { - levelFirst: true - }, - level: process.env.NODE_ENV === "jest" ? "silent" : "info" -})) +app.use( + logger({ + prettyPrint: { + levelFirst: true, + }, + level: process.env.NODE_ENV === "jest" ? "silent" : "info", + }) +) // api routes app.use(api.routes())