Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
yonatan24891 committed Feb 10, 2015
1 parent ae1ab76 commit d1c73b1
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 11 deletions.
2 changes: 1 addition & 1 deletion web/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var app = express();

// Middlewares
app.use('/static', express.static(path.join(__dirname, 'static')));
app.use(cookieParser())
app.use(cookieParser());
app.use(session({
name: 'SID',
secret: 'VirtualVulcano',
Expand Down
2 changes: 1 addition & 1 deletion web/app/models/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that
// can be found in the LICENSE.md file.

'use strict'
'use strict';

var Sequelize = require('sequelize'),
fs = require('fs'),
Expand Down
2 changes: 1 addition & 1 deletion web/app/plugins/accounts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var db = require('../models/db'),
promised = require('../middlewares/promised');


var login = function (req, res) {
var login = function (req) {
var query = {
where: {
username: req.body.user,
Expand Down
4 changes: 2 additions & 2 deletions web/app/plugins/change-password.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var plugins = require('../lib/plugins'),
Q = require('q');


var changePassword = function (req, res) {
var changePassword = function (req) {
var query = {
where: {
username: req.session.user,
Expand Down Expand Up @@ -48,7 +48,7 @@ var changePassword = function (req, res) {
};


var changePasswordForm = function (req, res) {
var changePasswordForm = function (req) {
return templates.render(req, 'vv.changePassword');
};

Expand Down
8 changes: 3 additions & 5 deletions web/app/seed.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@


var Sequelize = require('sequelize'),
_ = require('lodash'),
fs = require('fs'),
bcrypt = require('bcrypt'),
Q = require('q');

Expand All @@ -21,13 +19,13 @@ var connection = new Sequelize('information_schema', 'root', 'vvroot', {
var db;


connection.query("SELECT schema_name FROM schemata WHERE schema_name = 'virtualvulcano'")
connection.query('SELECT schema_name FROM schemata WHERE schema_name = \'virtualvulcano\'')
.then(function (schemas) {
if (schemas.length) {
return;
}

return connection.query("CREATE DATABASE virtualvulcano;")
return connection.query('CREATE DATABASE virtualvulcano;')
.then(function () {
db = require('./models/db');
db.setup();
Expand All @@ -47,7 +45,7 @@ connection.query("SELECT schema_name FROM schemata WHERE schema_name = 'virtualv
username: 'virtualvulcano',
password: password,
});
})
});
})
.then(function () {
console.log(' [*] Seed finished!');
Expand Down
13 changes: 12 additions & 1 deletion web/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,25 @@ gulp.task('test', function () {
gulp.task('lint:jshint:node', function () {
return lint('node', [
'app/**/*.js',
'!app/**/*.test.js',
'!app/static/**/*.js',
]);
});


gulp.task('lint:jshint:client', function () {
gulp.task('lint:jshint:browser', function () {
return lint('browser', [
'app/static/**/*.js',
'!app/**/*.test.js',
'!app/static/vendor/**/*.js',
]);
});


gulp.task('lint:jshint:tests', function () {
return lint('browser', [
'app/static/**/*.js',
'!app/**/*.test.js',
'!app/static/vendor/**/*.js',
]);
});
Expand Down
31 changes: 31 additions & 0 deletions web/lint/tests.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"browser": true,
"curly": true,
"globalstrict": true,
"immed": true,
"indent": 2,
"latedef": true,
"loopfunc": true,
"newcap": true,
"noarg": true,
"noempty": true,
"quotmark": "single",
"trailing": true,
"undef": true,
"unused": true,
"globals": {
"it": false,
"describe": false,
"xdescribe": false,
"beforeEach": false,
"afterEach": false,
"inject": false,
"jasmine": false,
"expect": false,
"spyOn": false,
"_": false,
"angular": false,
"moment": false,
"app": false
}
}

0 comments on commit d1c73b1

Please sign in to comment.