genediazjr/knexshelf

View on GitHub

Showing 6 of 19 total issues

File index.js has 301 lines of code (exceeds 250 allowed). Consider refactoring.
Open

'use strict';

const Joi = require('@hapi/joi');
const Queries = require('./queries');

Severity: Minor
Found in lib/index.js - About 3 hrs to fix

    File queries.js has 281 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint complexity: 0 */
    'use strict';
    
    const lib = require('.');
    
    
    Severity: Minor
    Found in lib/queries.js - About 2 hrs to fix

      Function update has 51 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          defaults.update = async function (params, payload, opts) {
      
              params = params || {};
              payload = payload || {};
              opts = opts || {};
      Severity: Major
      Found in lib/queries.js - About 2 hrs to fix

        Function delete has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            defaults.delete = async function (params, opts) {
        
                params = params || {};
                opts = opts || {};
        
        
        Severity: Minor
        Found in lib/queries.js - About 1 hr to fix

          Function obtain has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              defaults.obtain = async function (params, opts) {
          
                  if (!params) {
          
                      return null;
          Severity: Minor
          Found in lib/queries.js - About 1 hr to fix

            Avoid deeply nested control flow statements.
            Open

                                if (methodNames.indexOf(mkey) > -1) {
            
                                    throw new Error(`Duplicate method name ${mkey}.`);
                                }
            Severity: Major
            Found in lib/index.js - About 45 mins to fix
              Severity
              Category
              Status
              Source
              Language