From 12a5d6b1f42707e9b5da289e58b2ec5b4de2a60c Mon Sep 17 00:00:00 2001 From: Iain Collins Date: Mon, 27 Jul 2020 05:32:01 +0100 Subject: [PATCH] Fix linter errors --- src/adapters/typeorm/index.js | 2 +- src/providers/linkedin.js | 2 +- src/server/index.js | 2 +- src/server/pages/signin.js | 7 ++++--- www/sidebars.js | 4 ++-- www/src/pages/index.js | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/adapters/typeorm/index.js b/src/adapters/typeorm/index.js index 2d81aed1b7..2cd5219f27 100644 --- a/src/adapters/typeorm/index.js +++ b/src/adapters/typeorm/index.js @@ -1,6 +1,6 @@ import { createConnection, getConnection } from 'typeorm' import { createHash } from 'crypto' -import require_optional from 'require_optional' +import require_optional from 'require_optional' // eslint-disable-line camelcase import { CreateUserError } from '../../lib/errors' import adapterConfig from './lib/config' diff --git a/src/providers/linkedin.js b/src/providers/linkedin.js index 064ce70960..954c3795dc 100644 --- a/src/providers/linkedin.js +++ b/src/providers/linkedin.js @@ -19,7 +19,7 @@ export default (options) => { name: profile.localizedFirstName + ' ' + profile.localizedLastName, email: null, image: null - }; + } }, ...options } diff --git a/src/server/index.js b/src/server/index.js index 6c8615f703..8c8cbb29b5 100644 --- a/src/server/index.js +++ b/src/server/index.js @@ -235,7 +235,7 @@ export default async (req, res, userSuppliedOptions) => { res.json({ csrfToken }) return done() case 'signin': - if (options.pages.signIn) { + if (options.pages.signIn) { let redirectUrl = `${options.pages.signIn}${options.pages.signIn.includes('?') ? '&' : '?'}callbackUrl=${options.callbackUrl}` if (req.query.error) { redirectUrl = `${redirectUrl}&error=${req.query.error}` } return redirect(redirectUrl) diff --git a/src/server/pages/signin.js b/src/server/pages/signin.js index 98193a0e7a..5c2082c607 100644 --- a/src/server/pages/signin.js +++ b/src/server/pages/signin.js @@ -46,9 +46,10 @@ export default ({ req, csrfToken, providers, callbackUrl }) => { return render(
- {errorMessage &&
- {errorMessage} -
} + {errorMessage && +
+ {errorMessage} +
} {providersToRender.map((provider, i) =>
{provider.type === 'oauth' && diff --git a/www/sidebars.js b/www/sidebars.js index 2c88a85b3a..1a848a69e3 100644 --- a/www/sidebars.js +++ b/www/sidebars.js @@ -35,7 +35,7 @@ module.exports = { 'providers/gitlab', 'providers/google', 'providers/identity-server4', - "providers/linkedin", + 'providers/linkedin', 'providers/mixer', 'providers/okta', 'providers/slack', @@ -43,6 +43,6 @@ module.exports = { 'providers/twitch', 'providers/twitter', 'providers/yandex' - ], + ] } } diff --git a/www/src/pages/index.js b/www/src/pages/index.js index 80d569c185..ca29b73719 100644 --- a/www/src/pages/index.js +++ b/www/src/pages/index.js @@ -117,7 +117,7 @@ function Home () {
-
+