Showing 23 of 148 total issues
File kal-select.component.ts
has 360 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
AfterContentInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
KalSelectComponent
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'kal-select',
exportAs: 'kalSelect',
templateUrl: './kal-select.component.html',
styleUrls: ['./kal-select.sass'],
KalListComponent
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'kal-list',
exportAs: 'kalList',
templateUrl: './kal-list.component.html',
styleUrls: ['./kal-list.sass'],
File kal-list.component.ts
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChild,
KalDate
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
export class KalDate {
/**
* Current DayJS class object.
*/
KalDatepickerComponent
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'kal-datepicker',
exportAs: 'kalDatepicker',
templateUrl: './kal-datepicker.component.html',
styleUrls: ['./kal-datepicker.sass'],
File kal-datepicker.component.ts
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
AfterContentInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
KalSliderComponent
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
@Component({
selector: 'kal-slider',
exportAs: 'kalSlider',
templateUrl: './kal-slider.component.html',
encapsulation: ViewEncapsulation.None,
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
Function loading
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
@Input('kalLoading')
@Coerce('boolean')
set loading(loading: boolean) {
if (this._loading) { // currently loading
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ngAfterContentInit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
ngAfterContentInit(): void {
this.control = this.createControlAndSubscriptions(this.injector, 'blur');
// watch value changes
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function handleKeydown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
handleKeydown(event: KeyboardEvent) {
const keyCode = event.keyCode;
switch (keyCode) {
case ESCAPE:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function updateOptionsList
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private updateOptionsList(expression = '') {
if (this.autocompleteComponent) {
let optionsList = this._optionsList;
if ((expression || '').trim() !== '') {
try {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function getDate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private static getDate(rawDate: KalDateType, format = 'dd/MM/yyyy'): Dayjs {
let date: Dayjs;
if (rawDate instanceof Date) {
date = dayjs(rawDate);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function buildPositionsConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Memoize({
resolver(targetHeight, positionsList) {
return targetHeight + positionsList.sort().join('');
}
})
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function selectTabHeader
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
selectTabHeader(tab: KalTabComponent, tabIndex: number, params = {emitEvent: true}) {
if (!tab.disabled) {
this.selectedTabIndex = tabIndex;
this.keyManager.setActiveItem(this.selectedIndex);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function hideTooltip
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@HostListener('mouseleave')
@HostListener('touchleave')
hideTooltip(): void {
if (this.overlayRef) {
const instance: KalTooltipComponent = this.componentRef.instance;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function triggerValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
get triggerValue(): string {
if (!this.selection || this.selection.length === 0) {
return null;
}
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"