switching to eslint for code checking
most rules degraded to WARN, so we don't go insane. This will change over time. The aim is to conform to a common style Signed-off-by: Claudius Coenen <opensource@amenthes.de>
This commit is contained in:
@@ -25,6 +25,7 @@ if (config.dbURL) {
|
||||
// https://github.com/sequelize/sequelize/issues/6485
|
||||
function stripNullByte (value) {
|
||||
value = '' + value
|
||||
// eslint-disable-next-line no-control-regex
|
||||
return value ? value.replace(/\u0000/g, '') : value
|
||||
}
|
||||
sequelize.stripNullByte = stripNullByte
|
||||
|
||||
@@ -50,7 +50,7 @@ module.exports = function (sequelize, DataTypes) {
|
||||
}, {
|
||||
instanceMethods: {
|
||||
verifyPassword: function (attempt) {
|
||||
if (scrypt.verifyKdfSync(new Buffer(this.password, 'hex'), attempt)) {
|
||||
if (scrypt.verifyKdfSync(Buffer.from(this.password, 'hex'), attempt)) {
|
||||
return this
|
||||
} else {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user