estate/bookshelf-bcrypt

View on GitHub

Showing 4 of 4 total issues

Function exports has 73 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = (bookshelf, settings) => {
const BookshelfModel = bookshelf.Model
 
// Add default settings
settings = merge({
Severity: Major
Found in index.js - About 2 hrs to fix

    Function exports has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
    Open

    module.exports = (bookshelf, settings) => {
    const BookshelfModel = bookshelf.Model
     
    // Add default settings
    settings = merge({
    Severity: Minor
    Found in index.js - About 2 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    bookshelf.EmptyPasswordDetected = BookshelfModel.EmptyPasswordDetected = class extends Error {
    constructor () {
    super('Bcrypt cannot hash a null or undefined password')
    this.name = 'EmptyPasswordDetected'
    }
    Severity: Minor
    Found in index.js and 1 other location - About 40 mins to fix
    index.js on lines 76..81

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    bookshelf.BcryptRehashDetected = BookshelfModel.BcryptRehashDetected = class extends Error {
    constructor () {
    super('Bcrypt tried to hash another bcrypt hash')
    this.name = 'BcryptRehashDetected'
    }
    Severity: Minor
    Found in index.js and 1 other location - About 40 mins to fix
    index.js on lines 87..92
    Severity
    Category
    Status
    Source
    Language