tkqubo/conditional-decorator

View on GitHub

Showing 2 of 139 total issues

Function conditional has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function conditional(test: any, decorator: Function): any {
  'use strict';
  return function (target: Object, key: string|symbol, value: any): any {
    if (utils.isClassDecorator(decorator, arguments)) {
      let clazz: Function = target as Function;
Severity: Minor
Found in src/conditional.ts - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

          return;
    Severity: Major
    Found in test/utils.spec.ts - About 30 mins to fix
      Severity
      Category
      Status
      Source
      Language