0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Bump grunt-jslint and fix issues

This commit is contained in:
Hannah Wolfe 2013-11-01 12:12:01 +00:00
parent e9eacc454a
commit 0db907ada2
4 changed files with 19 additions and 18 deletions

View file

@ -12,7 +12,7 @@ var Ghost = require('../../ghost'),
db; db;
db = { db = {
export: function (req, res) { 'export': function (req, res) {
/*jslint unparam:true*/ /*jslint unparam:true*/
return dataExport().then(function (exportedData) { return dataExport().then(function (exportedData) {
// Save the exported data to the file system for download // Save the exported data to the file system for download
@ -38,7 +38,8 @@ db = {
}); });
}); });
}, },
import: function (req, res) { 'import': function (req, res) {
var notification;
if (!req.files.importfile || req.files.importfile.size === 0 || req.files.importfile.name.indexOf('json') === -1) { if (!req.files.importfile || req.files.importfile.size === 0 || req.files.importfile.name.indexOf('json') === -1) {
/** /**
@ -49,7 +50,7 @@ db = {
* - If the size is 0 * - If the size is 0
* - If the name doesn't have json in it * - If the name doesn't have json in it
*/ */
var notification = { notification = {
type: 'error', type: 'error',
message: "Must select a .json file to import", message: "Must select a .json file to import",
status: 'persistent', status: 'persistent',
@ -124,7 +125,7 @@ db = {
}); });
}) })
.then(function importSuccess() { .then(function importSuccess() {
var notification = { notification = {
type: 'success', type: 'success',
message: "Data imported. Log in with the user details you imported", message: "Data imported. Log in with the user details you imported",
status: 'persistent', status: 'persistent',
@ -141,7 +142,7 @@ db = {
}, function importFailure(error) { }, function importFailure(error) {
// Notify of an error if it occurs // Notify of an error if it occurs
var notification = { notification = {
type: 'error', type: 'error',
message: error.message || error, message: error.message || error,
status: 'persistent', status: 'persistent',
@ -152,7 +153,7 @@ db = {
res.redirect('/ghost/debug/'); res.redirect('/ghost/debug/');
}); });
}); });
}, }
}; };
module.exports.db = db; module.exports.db = db;

View file

@ -122,7 +122,7 @@ frontendControllers = {
title: _.escape(post.title), title: _.escape(post.title),
guid: post.uuid, guid: post.uuid,
url: siteUrl + '/' + post.slug + '/', url: siteUrl + '/' + post.slug + '/',
date: post.published_at, date: post.published_at
}, },
content = post.html; content = post.html;

View file

@ -23,7 +23,7 @@ var when = require('when'),
updated_at: {maxlength: 0, nullable: true}, updated_at: {maxlength: 0, nullable: true},
updated_by: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true},
published_at: {maxlength: 0, nullable: true}, published_at: {maxlength: 0, nullable: true},
published_by: {maxlength: 0, nullable: true}, published_by: {maxlength: 0, nullable: true}
}, },
users: { users: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
@ -46,7 +46,7 @@ var when = require('when'),
created_at: {maxlength: 0, nullable: false}, created_at: {maxlength: 0, nullable: false},
created_by: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false},
updated_at: {maxlength: 0, nullable: true}, updated_at: {maxlength: 0, nullable: true},
updated_by: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true}
}, },
roles: { roles: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
@ -56,12 +56,12 @@ var when = require('when'),
created_at: {maxlength: 0, nullable: false}, created_at: {maxlength: 0, nullable: false},
created_by: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false},
updated_at: {maxlength: 0, nullable: true}, updated_at: {maxlength: 0, nullable: true},
updated_by: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true}
}, },
roles_users: { roles_users: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
role_id: {maxlength: 0, nullable: false}, role_id: {maxlength: 0, nullable: false},
user_id: {maxlength: 0, nullable: false}, user_id: {maxlength: 0, nullable: false}
}, },
permissions: { permissions: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
@ -73,17 +73,17 @@ var when = require('when'),
created_at: {maxlength: 0, nullable: false}, created_at: {maxlength: 0, nullable: false},
created_by: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false},
updated_at: {maxlength: 0, nullable: true}, updated_at: {maxlength: 0, nullable: true},
updated_by: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true}
}, },
permissions_users: { permissions_users: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
user_id: {maxlength: 0, nullable: false}, user_id: {maxlength: 0, nullable: false},
permission_id: {maxlength: 0, nullable: false}, permission_id: {maxlength: 0, nullable: false}
}, },
permissions_roles: { permissions_roles: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
role_id: {maxlength: 0, nullable: false}, role_id: {maxlength: 0, nullable: false},
permission_id: {maxlength: 0, nullable: false}, permission_id: {maxlength: 0, nullable: false}
}, },
settings: { settings: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
@ -94,7 +94,7 @@ var when = require('when'),
created_at: {maxlength: 0, nullable: false}, created_at: {maxlength: 0, nullable: false},
created_by: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false},
updated_at: {maxlength: 0, nullable: true}, updated_at: {maxlength: 0, nullable: true},
updated_by: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true}
}, },
tags: { tags: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
@ -108,12 +108,12 @@ var when = require('when'),
created_at: {maxlength: 0, nullable: false}, created_at: {maxlength: 0, nullable: false},
created_by: {maxlength: 0, nullable: false}, created_by: {maxlength: 0, nullable: false},
updated_at: {maxlength: 0, nullable: true}, updated_at: {maxlength: 0, nullable: true},
updated_by: {maxlength: 0, nullable: true}, updated_by: {maxlength: 0, nullable: true}
}, },
posts_tags: { posts_tags: {
id: {maxlength: 0, nullable: false}, id: {maxlength: 0, nullable: false},
post_id: {maxlength: 0, nullable: false}, post_id: {maxlength: 0, nullable: false},
tag_id: {maxlength: 0, nullable: false}, tag_id: {maxlength: 0, nullable: false}
} }
}; };

View file

@ -66,7 +66,7 @@
"grunt-contrib-watch": "~0.5.3", "grunt-contrib-watch": "~0.5.3",
"grunt-express-server": "~0.4.2", "grunt-express-server": "~0.4.2",
"grunt-groc": "~0.3.0", "grunt-groc": "~0.3.0",
"grunt-jslint": "~1.0.0", "grunt-jslint": "~1.1.1",
"grunt-mocha-cli": "~1.0.6", "grunt-mocha-cli": "~1.0.6",
"grunt-open": "~0.2.2", "grunt-open": "~0.2.2",
"grunt-shell": "~0.3.1", "grunt-shell": "~0.3.1",