From 692f577eb3bbc5cd1f9bad1f67f1e52c21c5a7e6 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Tue, 3 Nov 2015 21:51:16 -0800 Subject: [PATCH] Fix linting issue --- common/app/routes/Bonfires/index.js | 4 +++- server/boot/a-extendUserIdent.js | 14 ++++++++++++-- server/boot/challenge.js | 2 +- server/boot/explorer.js | 2 +- server/boot/randomAPIs.js | 6 ++++-- server/boot/redirects.js | 9 ++++++--- server/config.production.js | 2 +- 7 files changed, 28 insertions(+), 11 deletions(-) diff --git a/common/app/routes/Bonfires/index.js b/common/app/routes/Bonfires/index.js index edcb26c104b..ec633552eb8 100644 --- a/common/app/routes/Bonfires/index.js +++ b/common/app/routes/Bonfires/index.js @@ -1,6 +1,8 @@ +/* export default { - path: 'bonfires/(:bonfireName)', + path: 'bonfires/(:bonfireName)' getComponents(cb) { // TODO(berks): add bonfire component } }; +*/ diff --git a/server/boot/a-extendUserIdent.js b/server/boot/a-extendUserIdent.js index d14874d08b4..e86ae66ee52 100644 --- a/server/boot/a-extendUserIdent.js +++ b/server/boot/a-extendUserIdent.js @@ -1,7 +1,9 @@ import{ Observable } from 'rx'; +import debugFactory from 'debug'; +import dedent from 'dedent'; + import { observeMethod, observeQuery } from '../utils/rx'; import { getSocialProvider } from '../utils/auth'; -import debugFactory from 'debug'; const debug = debugFactory('fcc:userIdent'); @@ -49,7 +51,15 @@ export default function({ models }) { } if (identity.userId.toString() !== userId.toString()) { return Observable.throw( - new Error("It looks like you already have an account associated with that sign in method. Here's what you can do: 1) Sign out of this account. 2) Use that sign in method to sign into your other account. 3) Delete that account. 4) Then sign back into this account and you'll be able to link it here. If you need help, send us an email at team@freecodecamp.com.") + new Error( + dedent` + It looks like you already have an account associated with that sign in method. + Here's what you can do: 1) Sign out of this account. 2) Use that sign in + method to sign into your other account. 3) Delete that account. + 4) Then sign back into this account and you'll be able to link it here. + If you need help, send us an email at team@freecodecamp.com. + `.split('/n').join(' ') + ) ); } identity.credentials = credentials; diff --git a/server/boot/challenge.js b/server/boot/challenge.js index 5bba2df4c97..2da739d9260 100644 --- a/server/boot/challenge.js +++ b/server/boot/challenge.js @@ -591,7 +591,7 @@ module.exports = function(app) { ), camperCount, lastCompleted, - title: "A Map to Learn to Code and Become a Software Engineer" + title: 'A Map to Learn to Code and Become a Software Engineer' }); }, next diff --git a/server/boot/explorer.js b/server/boot/explorer.js index 82081da065a..955b23573d8 100644 --- a/server/boot/explorer.js +++ b/server/boot/explorer.js @@ -5,7 +5,7 @@ module.exports = function mountLoopBackExplorer(app) { var explorer; try { explorer = require('loopback-explorer'); - } catch(err) { + } catch (err) { // Print the message only when the app was started via `app.listen()`. // Do not print any message when the project is used as a component. app.once('started', function() { diff --git a/server/boot/randomAPIs.js b/server/boot/randomAPIs.js index 14e1d7ba7d4..11f68c19477 100644 --- a/server/boot/randomAPIs.js +++ b/server/boot/randomAPIs.js @@ -192,7 +192,8 @@ module.exports = function(app) { function showTestimonials(req, res) { res.render('resources/stories', { - title: 'Testimonials from Happy Free Code Camp Students who got Software Engineer Jobs', + title: 'Testimonials from Happy Free Code Camp Students ' + + 'who got Software Engineer Jobs', stories: testimonials.slice(0, 72), moreStories: true }); @@ -200,7 +201,8 @@ module.exports = function(app) { function showAllTestimonials(req, res) { res.render('resources/stories', { - title: 'Testimonials from Happy Free Code Camp Students who got Software Engineer Jobs', + title: 'Testimonials from Happy Free Code Camp Students ' + + 'who got Software Engineer Jobs', stories: testimonials, moreStories: false }); diff --git a/server/boot/redirects.js b/server/boot/redirects.js index edd5d4b77ca..5703897e7ff 100644 --- a/server/boot/redirects.js +++ b/server/boot/redirects.js @@ -4,7 +4,8 @@ module.exports = function(app) { router.get('/nonprofit-project-instructions', function(req, res) { res.redirect( 301, - "//github.com/FreeCodeCamp/freecodecamp/wiki/How-Free-Code-Camp's-Nonprofit-Projects-work" + '//github.com/FreeCodeCamp/freecodecamp/wiki/' + + "How-Free-Code-Camp's-Nonprofit-Projects-work" ); }); @@ -18,7 +19,9 @@ module.exports = function(app) { router.get('/privacy', function(req, res) { res.redirect( - 301, "//github.com/FreeCodeCamp/freecodecamp/wiki/Free-Code-Camp's-Privacy-Policy" + 301, + '//github.com/FreeCodeCamp/freecodecamp/wiki/' + + "Free-Code-Camp's-Privacy-Policy" ); }); @@ -27,7 +30,7 @@ module.exports = function(app) { }); router.get('/field-guide/*', function(req, res) { - res.redirect(302, '//github.com/freecodecamp/freecodecamp/wiki') + res.redirect(302, '//github.com/freecodecamp/freecodecamp/wiki'); }); router.get('/about', function(req, res) { diff --git a/server/config.production.js b/server/config.production.js index 248be09fd2d..585b30e3b13 100644 --- a/server/config.production.js +++ b/server/config.production.js @@ -1,3 +1,3 @@ module.exports = { host: process.env.HOST || 'localhost' -}; \ No newline at end of file +};