feat(config): Deprecate JSHint in favor of ESLint

Add basic ESLint setup extending well-known Airbnb code style.

Fixes #1072, #1097
This commit is contained in:
Marek Grzybek
2015-12-10 20:31:51 +01:00
parent 4e9ad81ad2
commit d14d5130af
76 changed files with 266 additions and 255 deletions

View File

@@ -35,7 +35,7 @@ exports.read = function (req, res) {
// Add a custom field to the Article, for determining if the current User is the "owner".
// NOTE: This field is NOT persisted to the database, since it doesn't exist in the Article model.
article.isCurrentUserOwner = req.user && article.user && article.user._id.toString() === req.user._id.toString() ? true : false;
article.isCurrentUserOwner = !!(req.user && article.user && article.user._id.toString() === req.user._id.toString());
res.json(article);
};