jonshaffer/angular-data-table

View on GitHub
src/components/body/ScrollerDirective.js

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Function ScrollerDirective has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function ScrollerDirective() {
return {
restrict: 'E',
require: '^dtBody',
transclude: true,
Severity: Minor
Found in src/components/body/ScrollerDirective.js - About 2 hrs to fix

Function link has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

link($scope, $elm, $attrs, ctrl) {
const parent = $elm.parent();
 
let ticking = false;
let lastScrollY = 0;
Severity: Minor
Found in src/components/body/ScrollerDirective.js - About 1 hr to fix

Function ScrollerDirective has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

export default function ScrollerDirective() {
return {
restrict: 'E',
require: '^dtBody',
transclude: true,
Severity: Minor
Found in src/components/body/ScrollerDirective.js - About 55 mins to fix
Category
Status