Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/138960095/setup babel and mocha #3

Merged
merged 9 commits into from Feb 2, 2017

Conversation

andela-oakinseye
Copy link
Owner

What does this PR do?

Set up mocha, express and other important modules

Description of Task to be completed?

Install and setup required modules.

What are the relevant pivotal tracker stories?

#138960095

@@ -0,0 +1,7 @@
const assert = require('chai').assert;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai' import/no-unresolved

@@ -0,0 +1,7 @@
const assert = require('chai').assert;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unable to resolve path to module 'chai' import/no-unresolved

}
});

db.sequelize = sequelize;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'sequelize' used outside of binding context block-scoped-var

}
});

db.sequelize = sequelize;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'sequelize' used outside of binding context block-scoped-var

db[model.name] = model;
});

Object.keys(db).forEach(function(modelName) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function expression name func-names
Unexpected function expression prefer-arrow-callback
Missing space before function parentheses space-before-function-paren

db[model.name] = model;
});

Object.keys(db).forEach(function(modelName) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function expression name func-names
Unexpected function expression prefer-arrow-callback
Missing space before function parentheses space-before-function-paren

return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(function(file) {
var model = sequelize['import'](path.join(__dirname, file));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
'sequelize' used outside of binding context block-scoped-var
["import"] is better written in dot notation dot-notation

return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(function(file) {
var model = sequelize['import'](path.join(__dirname, file));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
'sequelize' used outside of binding context block-scoped-var
["import"] is better written in dot notation dot-notation

.filter(function(file) {
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(function(file) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected function expression prefer-arrow-callback
Missing function expression name func-names
Missing space before function parentheses space-before-function-paren

.filter(function(file) {
return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js');
})
.forEach(function(file) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected function expression prefer-arrow-callback
Missing function expression name func-names
Missing space before function parentheses space-before-function-paren


fs
.readdirSync(__dirname)
.filter(function(file) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function expression name func-names
Unexpected function expression prefer-arrow-callback
Missing space before function parentheses space-before-function-paren


fs
.readdirSync(__dirname)
.filter(function(file) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing function expression name func-names
Unexpected function expression prefer-arrow-callback
Missing space before function parentheses space-before-function-paren

if (config.use_env_variable) {
var sequelize = new Sequelize(process.env[config.use_env_variable]);
} else {
var sequelize = new Sequelize(config.database, config.username, config.password, config);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
All 'var' declarations must be at the top of the function scope vars-on-top
'sequelize' is already defined no-redeclare
'sequelize' used outside of binding context block-scoped-var

if (config.use_env_variable) {
var sequelize = new Sequelize(process.env[config.use_env_variable]);
} else {
var sequelize = new Sequelize(config.database, config.username, config.password, config);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
All 'var' declarations must be at the top of the function scope vars-on-top
'sequelize' is already defined no-redeclare
'sequelize' used outside of binding context block-scoped-var

var db = {};

if (config.use_env_variable) {
var sequelize = new Sequelize(process.env[config.use_env_variable]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 'var' declarations must be at the top of the function scope vars-on-top
Unexpected var, use let or const instead no-var
'sequelize' used outside of binding context block-scoped-var

var db = {};

if (config.use_env_variable) {
var sequelize = new Sequelize(process.env[config.use_env_variable]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 'var' declarations must be at the top of the function scope vars-on-top
Unexpected var, use let or const instead no-var
'sequelize' used outside of binding context block-scoped-var

var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../../config/config.json')[env];
var db = {};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../../config/config.json')[env];
var db = {};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

var Sequelize = require('sequelize');
var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../../config/config.json')[env];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces
Use path.join() or path.resolve() instead of + to create paths no-path-concat
Unexpected string concatenation prefer-template

var Sequelize = require('sequelize');
var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';
var config = require(__dirname + '/../../config/config.json')[env];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces
Use path.join() or path.resolve() instead of + to create paths no-path-concat
Unexpected string concatenation prefer-template

var path = require('path');
var Sequelize = require('sequelize');
var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

var path = require('path');
var Sequelize = require('sequelize');
var basename = path.basename(module.filename);
var env = process.env.NODE_ENV || 'development';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

var fs = require('fs');
var path = require('path');
var Sequelize = require('sequelize');
var basename = path.basename(module.filename);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

var fs = require('fs');
var path = require('path');
var Sequelize = require('sequelize');
var basename = path.basename(module.filename);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces


var fs = require('fs');
var path = require('path');
var Sequelize = require('sequelize');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Expected empty line after require statement not followed by another require import/newline-after-import
Unable to resolve path to module 'sequelize' import/no-unresolved


var fs = require('fs');
var path = require('path');
var Sequelize = require('sequelize');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Expected empty line after require statement not followed by another require import/newline-after-import
Unable to resolve path to module 'sequelize' import/no-unresolved

'use strict';

var fs = require('fs');
var path = require('path');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

'use strict';

var fs = require('fs');
var path = require('path');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

@@ -0,0 +1,36 @@
'use strict';

var fs = require('fs');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

@@ -0,0 +1,36 @@
'use strict';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'use strict' is unnecessary inside of modules strict

@@ -0,0 +1,36 @@
'use strict';

var fs = require('fs');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected var, use let or const instead no-var
Multiple spaces found before '=' no-multi-spaces

@@ -0,0 +1,36 @@
'use strict';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'use strict' is unnecessary inside of modules strict

@andela-oakinseye andela-oakinseye merged commit 6a45335 into master Feb 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants