fix some linting issues

This commit is contained in:
Berkeley Martinez
2015-08-29 01:48:01 -07:00
parent f0b953eb66
commit 16b33ee90a
4 changed files with 22 additions and 17 deletions

View File

@ -43,6 +43,7 @@
"csso": "~1.3.11", "csso": "~1.3.11",
"dateformat": "~1.0.11", "dateformat": "~1.0.11",
"debug": "~2.1.0", "debug": "~2.1.0",
"dedent": "^0.4.0",
"dotenv": "~0.4.0", "dotenv": "~0.4.0",
"errorhandler": "~1.3.0", "errorhandler": "~1.3.0",
"eslint": "^1.1.0", "eslint": "^1.1.0",

View File

@ -1,4 +1,5 @@
import _ from 'lodash'; import _ from 'lodash';
import dedent from 'dedent';
import moment from 'moment'; import moment from 'moment';
import { Observable, Scheduler } from 'rx'; import { Observable, Scheduler } from 'rx';
import assign from 'object.assign'; import assign from 'object.assign';
@ -208,10 +209,12 @@ module.exports = function(app) {
debug('next challengeName', nextChallengeName); debug('next challengeName', nextChallengeName);
if (!nextChallengeName || nextChallengeName === firstChallenge) { if (!nextChallengeName || nextChallengeName === firstChallenge) {
req.flash('errors', { req.flash('errors', {
msg: 'Once you have completed all of our challenges, you should '+ msg: dedent`
'join our <a href=\"//gitter.im/freecodecamp/HalfWayClub\"'+ Once you have completed all of our challenges, you should
'target=\"_blank\">Half Way Club</a> and start getting '+ join our <a href=\"//gitter.im/freecodecamp/HalfWayClub\"
'ready for our nonprofit projects.' target=\"_blank\">Half Way Club</a> and start getting
ready for our nonprofit projects.
`.split('\n').join(' ')
}); });
return res.redirect('/map'); return res.redirect('/map');
} }

View File

@ -64,21 +64,22 @@ module.exports = function(app) {
return res.redirect('../nonprofit/' + dashedNameFull); return res.redirect('../nonprofit/' + dashedNameFull);
} }
//We need to create logic that verifies completion. Defaulting to false for now. // We need to create logic that verifies completion.
//var buttonActive = false; // Defaulting to false for now.
//if ( // var buttonActive = false;
// req.user && // if (
// req.user.completedCoursewares.length > 63 // req.user &&
//) { // req.user.completedCoursewares.length > 63
// var hasShownInterest = // ) {
// nonprofit.interestedCampers.filter(function(user) { // var hasShownInterest =
// return user.username === req.user.username; // nonprofit.interestedCampers.filter(function(user) {
// }); // return user.username === req.user.username;
// });
// //
// if (hasShownInterest.length === 0) { // if (hasShownInterest.length === 0) {
// buttonActive = true; // buttonActive = true;
// }
// } // }
//}
res.render('nonprofits/show', { res.render('nonprofits/show', {
dashedName: dashedNameFull, dashedName: dashedNameFull,