diff options
author | Sheogorath | 2019-05-31 00:27:56 +0200 |
---|---|---|
committer | Sheogorath | 2019-05-31 00:30:29 +0200 |
commit | 4da68597f701376307fe8849ed57edd3a80833ed (patch) | |
tree | fb50db25c63b3b2cb70426ba3eab42007be60134 /lib/web/auth | |
parent | 3eca0a74ae3d87a42acb7c7b8e39e2c389e3c96c (diff) |
Fix eslint warnings
Since we are about to release it's time to finally fix our linting. This
patch basically runs eslint --fix and does some further manual fixes.
Also it sets up eslint to fail on every warning on order to make
warnings visable in the CI process.
There should no functional change be introduced.
Signed-off-by: Sheogorath <sheogorath@shivering-isles.com>
Diffstat (limited to 'lib/web/auth')
-rw-r--r-- | lib/web/auth/dropbox/index.js | 2 | ||||
-rw-r--r-- | lib/web/auth/email/index.js | 4 | ||||
-rw-r--r-- | lib/web/auth/facebook/index.js | 2 | ||||
-rw-r--r-- | lib/web/auth/github/index.js | 2 | ||||
-rw-r--r-- | lib/web/auth/gitlab/index.js | 2 | ||||
-rw-r--r-- | lib/web/auth/google/index.js | 6 | ||||
-rw-r--r-- | lib/web/auth/ldap/index.js | 4 | ||||
-rw-r--r-- | lib/web/auth/mattermost/index.js | 14 | ||||
-rw-r--r-- | lib/web/auth/oauth2/index.js | 2 | ||||
-rw-r--r-- | lib/web/auth/openid/index.js | 4 | ||||
-rw-r--r-- | lib/web/auth/saml/index.js | 2 | ||||
-rw-r--r-- | lib/web/auth/twitter/index.js | 2 |
12 files changed, 23 insertions, 23 deletions
diff --git a/lib/web/auth/dropbox/index.js b/lib/web/auth/dropbox/index.js index c44607da..1cfabd29 100644 --- a/lib/web/auth/dropbox/index.js +++ b/lib/web/auth/dropbox/index.js @@ -4,7 +4,7 @@ const Router = require('express').Router const passport = require('passport') const DropboxStrategy = require('passport-dropbox-oauth2').Strategy const config = require('../../../config') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let dropboxAuth = module.exports = Router() diff --git a/lib/web/auth/email/index.js b/lib/web/auth/email/index.js index daa4a8c5..32e21428 100644 --- a/lib/web/auth/email/index.js +++ b/lib/web/auth/email/index.js @@ -7,8 +7,8 @@ const LocalStrategy = require('passport-local').Strategy const config = require('../../../config') const models = require('../../../models') const logger = require('../../../logger') -const {setReturnToFromReferer} = require('../utils') -const {urlencodedParser} = require('../../utils') +const { setReturnToFromReferer } = require('../utils') +const { urlencodedParser } = require('../../utils') const response = require('../../../response') let emailAuth = module.exports = Router() diff --git a/lib/web/auth/facebook/index.js b/lib/web/auth/facebook/index.js index b2364989..418ddeee 100644 --- a/lib/web/auth/facebook/index.js +++ b/lib/web/auth/facebook/index.js @@ -5,7 +5,7 @@ const passport = require('passport') const FacebookStrategy = require('passport-facebook').Strategy const config = require('../../../config') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let facebookAuth = module.exports = Router() diff --git a/lib/web/auth/github/index.js b/lib/web/auth/github/index.js index ece634ba..afa5fa31 100644 --- a/lib/web/auth/github/index.js +++ b/lib/web/auth/github/index.js @@ -5,7 +5,7 @@ const passport = require('passport') const GithubStrategy = require('passport-github').Strategy const config = require('../../../config') const response = require('../../../response') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let githubAuth = module.exports = Router() diff --git a/lib/web/auth/gitlab/index.js b/lib/web/auth/gitlab/index.js index 38436024..4cebbc10 100644 --- a/lib/web/auth/gitlab/index.js +++ b/lib/web/auth/gitlab/index.js @@ -5,7 +5,7 @@ const passport = require('passport') const GitlabStrategy = require('passport-gitlab2').Strategy const config = require('../../../config') const response = require('../../../response') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let gitlabAuth = module.exports = Router() diff --git a/lib/web/auth/google/index.js b/lib/web/auth/google/index.js index 0a4fd55e..ad9bcd7a 100644 --- a/lib/web/auth/google/index.js +++ b/lib/web/auth/google/index.js @@ -4,7 +4,7 @@ const Router = require('express').Router const passport = require('passport') var GoogleStrategy = require('passport-google-oauth20').Strategy const config = require('../../../config') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let googleAuth = module.exports = Router() @@ -12,14 +12,14 @@ passport.use(new GoogleStrategy({ clientID: config.google.clientID, clientSecret: config.google.clientSecret, callbackURL: config.serverURL + '/auth/google/callback', - userProfileURL: "https://www.googleapis.com/oauth2/v3/userinfo" + userProfileURL: 'https://www.googleapis.com/oauth2/v3/userinfo' }, passportGeneralCallback)) googleAuth.get('/auth/google', function (req, res, next) { setReturnToFromReferer(req) passport.authenticate('google', { scope: ['profile'] })(req, res, next) }) - // google auth callback +// google auth callback googleAuth.get('/auth/google/callback', passport.authenticate('google', { successReturnToOrRedirect: config.serverURL + '/', diff --git a/lib/web/auth/ldap/index.js b/lib/web/auth/ldap/index.js index 8d71c18e..77790db3 100644 --- a/lib/web/auth/ldap/index.js +++ b/lib/web/auth/ldap/index.js @@ -6,8 +6,8 @@ const LDAPStrategy = require('passport-ldapauth') const config = require('../../../config') const models = require('../../../models') const logger = require('../../../logger') -const {setReturnToFromReferer} = require('../utils') -const {urlencodedParser} = require('../../utils') +const { setReturnToFromReferer } = require('../utils') +const { urlencodedParser } = require('../../utils') const response = require('../../../response') let ldapAuth = module.exports = Router() diff --git a/lib/web/auth/mattermost/index.js b/lib/web/auth/mattermost/index.js index 63a4886f..48d6d297 100644 --- a/lib/web/auth/mattermost/index.js +++ b/lib/web/auth/mattermost/index.js @@ -5,7 +5,7 @@ const passport = require('passport') const Mattermost = require('mattermost') const OAuthStrategy = require('passport-oauth2').Strategy const config = require('../../../config') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') const mattermost = new Mattermost.Client() @@ -24,12 +24,12 @@ mattermostStrategy.userProfile = (accessToken, done) => { mattermost.token = accessToken mattermost.useHeaderToken() mattermost.getMe( - (data) => { - done(null, data) - }, - (err) => { - done(err) - } + (data) => { + done(null, data) + }, + (err) => { + done(err) + } ) } diff --git a/lib/web/auth/oauth2/index.js b/lib/web/auth/oauth2/index.js index 57ab9b9a..78434271 100644 --- a/lib/web/auth/oauth2/index.js +++ b/lib/web/auth/oauth2/index.js @@ -4,7 +4,7 @@ const Router = require('express').Router const passport = require('passport') const { Strategy, InternalOAuthError } = require('passport-oauth2') const config = require('../../../config') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let oauth2Auth = module.exports = Router() diff --git a/lib/web/auth/openid/index.js b/lib/web/auth/openid/index.js index c45c6d71..8d271a7a 100644 --- a/lib/web/auth/openid/index.js +++ b/lib/web/auth/openid/index.js @@ -6,8 +6,8 @@ const OpenIDStrategy = require('@passport-next/passport-openid').Strategy const config = require('../../../config') const models = require('../../../models') const logger = require('../../../logger') -const {urlencodedParser} = require('../../utils') -const {setReturnToFromReferer} = require('../utils') +const { urlencodedParser } = require('../../utils') +const { setReturnToFromReferer } = require('../utils') let openIDAuth = module.exports = Router() diff --git a/lib/web/auth/saml/index.js b/lib/web/auth/saml/index.js index 3cdb7fe2..2289b010 100644 --- a/lib/web/auth/saml/index.js +++ b/lib/web/auth/saml/index.js @@ -6,7 +6,7 @@ const SamlStrategy = require('passport-saml').Strategy const config = require('../../../config') const models = require('../../../models') const logger = require('../../../logger') -const {urlencodedParser} = require('../../utils') +const { urlencodedParser } = require('../../utils') const fs = require('fs') const intersection = function (array1, array2) { return array1.filter((n) => array2.includes(n)) } diff --git a/lib/web/auth/twitter/index.js b/lib/web/auth/twitter/index.js index c1860d93..5aba20ff 100644 --- a/lib/web/auth/twitter/index.js +++ b/lib/web/auth/twitter/index.js @@ -5,7 +5,7 @@ const passport = require('passport') const TwitterStrategy = require('passport-twitter').Strategy const config = require('../../../config') -const {setReturnToFromReferer, passportGeneralCallback} = require('../utils') +const { setReturnToFromReferer, passportGeneralCallback } = require('../utils') let twitterAuth = module.exports = Router() |