How to use codelyzer - 10 common examples

To help you get started, we’ve selected a few codelyzer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github w11k / angular-sticky-things / projects / angular-sticky-things / src / lib / sticky-thing.directive.ts View on Github external
private determineStatus(originalVals: StickyPositions, pageYOffset: number, marginTop: number, marginBottom: number, enabled: boolean) {
    const elementPos = this.determineElementOffsets();
    let isSticky = enabled && pageYOffset > originalVals.offsetY;
    if (pageYOffset < this.elementOffsetY) {
      isSticky = false;
    }
    const stickyElementHeight = this.getComputedStyle(this.stickyElement.nativeElement).height;
    const reachedLowerEdge = isNotNullOrUndefined(this.boundaryElement) ? this.boundaryElement && window.pageYOffset + stickyElementHeight + marginBottom >= (originalVals.bottomBoundary - marginTop * 1.0) : undefined;
    const reachedUpperEdge = isNotNullOrUndefined(this.boundaryElement) ? window.pageYOffset < (this.boundaryElement.offsetTop + marginTop * 1.0) : undefined;
    this.stickyPosition.emit({...elementPos, upperScreenEdgeAt: pageYOffset, marginBottom, marginTop});
    return {
      isSticky,
      reachedUpperEdge,
      reachedLowerEdge,
    };

  }
github dynatrace-oss / barista / src / linting / rules / tile / dtTileDirectChildrenRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtTileVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / tools / linting / src / rules / dtInputRequiresLabelRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtInputVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / tools / linting / src / rules / tabs / dtTabRequiresLabelRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtTabVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / src / linting / rules / card / dtCardDirectChildrenRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtCardVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / src / linting / rules / dtSwitchNoEmptyRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtSwitchVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / src / linting / rules / dtSelectionAreaAltTextRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtSelectionAreaVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / src / linting / rules / card / dtCardNeedsTitleRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtCardVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / src / linting / rules / dtRadioButtonNoEmptyRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtRadioButtonVisitor,
      }),
    );
  }
}
github dynatrace-oss / barista / tools / linting / src / rules / dtContextDialogAltTextRule.ts View on Github external
apply(sourceFile: SourceFile): RuleFailure[] {
    return this.applyWithWalker(
      new NgWalker(sourceFile, this.getOptions(), {
        templateVisitorCtrl: DtContextDialogVisitor,
      }),
    );
  }
}