shawnholman/Aych

View on GitHub

Showing 4 of 4 total issues

Function getValueFromObject has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private static getValueFromObject(object: SimpleObject, key: string): string {
        const keys = key.split(".").map(this.parseKey);
        let track: any = object;
        let prevKey: string | undefined = undefined;

Severity: Minor
Found in src/core/TemplateParser.ts - About 1 hr to fix

    Function setAttribute has 29 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        setAttribute(name: string, value: Attribute): Element {
            // If the attribute is an array like: [true, 'trueAttr', 'falseAttr']
            // Then if true, use: 'trueAttr", else use: 'falseAttr'
            if (Array.isArray(value)) {
                // If the boolean element is true
    Severity: Minor
    Found in src/elements/Element.ts - About 1 hr to fix

      Function constructor has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          constructor(tag: string, tier1?: string | Renderable | Attributes, tier2?: string | Renderable | Attributes,  ...children: (Renderable|string)[]) {
              super(tag);
      
              if (isString(tier1) || isRenderable(tier1)) {
                  if (isString(tier1) && Element.isIdentifierString(tier1)) {
      Severity: Minor
      Found in src/elements/NestableElement.ts - About 1 hr to fix

        Avoid too many return statements within this function.
        Open

                return this;
        Severity: Major
        Found in src/elements/Element.ts - About 30 mins to fix
          Severity
          Category
          Status
          Source
          Language