-
Notifications
You must be signed in to change notification settings - Fork 1
#156304277 Setup sequelize with mysql #3
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
Conversation
- add sequelize, sequelize-cli and mysql2 packages - create migration for Item [Finishes #156304277]
| } | ||
| }); | ||
|
|
||
| db.sequelize = sequelize; |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected unnamed function 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)); |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
Unexpected unnamed function func-names
Missing space before function parentheses space-before-function-paren
| fs | ||
| .readdirSync(__dirname) | ||
| .filter(function(file) { | ||
| return (file.indexOf('.') !== 0) && (file !== basename) && (file.slice(-3) === '.js'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 20 exceeds the maximum line length of 80 max-len
| var fs = require('fs'); | ||
| var path = require('path'); | ||
| var Sequelize = require('sequelize'); | ||
| var basename = path.basename(module.filename); |
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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 1 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'); |
There was a problem hiding this comment.
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'); | |||
There was a problem hiding this comment.
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'; | |||
There was a problem hiding this comment.
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
No description provided.