Showing 272 of 791 total issues
Function calendar
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function calendar(date: Date,
time: Date,
formats: CalendarSpec,
locale: Locale = getLocale(),
config: DateParsingConfig = {}): string {
Function createLocalOrUTC
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function createLocalOrUTC(input: DateInput, format?: string | string[], localeKey?: string, strict?: boolean, isUTC?: boolean): DateParsingConfig {
Function diff
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function diff(date: Date, input: Date,
units: UnitOfTime, asFloat: boolean,
config: DateParsingConfig = {}
Function parseDate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function parseDate(input: DateInput, format?: string | string[],
localeKey?: string, strict?: boolean, isUTC?: boolean): Date {
Function substituteTimeAgo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function substituteTimeAgo(str: 'future' | 'past', num: number,
withoutSuffix: boolean, isFuture: boolean,
locale: Locale): string {
Function dayOfYearFromWeeks
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
year: number,
week: number,
weekday: number,
dow: number,
doy: number
Function setUTCOffset
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function setUTCOffset(date: Date, input: number | string, keepLocalTime?: boolean, keepMinutes?: boolean, config: DateParsingConfig = {}): Date {
Function isBetween
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
date: Date,
from: Date,
to: Date,
units: UnitOfTime,
inclusivity = '()'
Function formatDate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function formatDate(date: Date, format: string, locale?: string, isUTC?: boolean, offset = 0): string {
Function formatMoment
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function formatMoment(date: Date, _format: string, locale: Locale, isUTC?: boolean, offset = 0): string {
Function setEventHandlers
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
setEventHandlers(container: BsDatepickerAbstractComponent): BsDatepickerEffects {
container.setViewMode = (event: BsDatepickerViewMode): void => {
this._store.dispatch(this._actions.changeViewMode(event));
};
- 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 exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
module.exports = function (config) {
const configuration = {
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
- 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 monthsRegex
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
monthsRegex(isStrict: boolean): RegExp {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
this.computeMonthsParse();
}
- 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 setTime
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function setTime(value: Date, opts: Time): Date {
let hour = parseHours(opts.hour);
const minute = parseMinutes(opts.minute);
const seconds = parseSeconds(opts.seconds) || 0;
- 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 ngOnInit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
ngOnInit(): void {
if (this.isAnimated) {
this._renderer.addClass(
this._element.nativeElement,
CLASS_NAME.FADE
- 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 formatReducer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function formatReducer(state: BsDatepickerState,
action: Action): BsDatepickerState {
if (state.view.mode === 'day') {
const formattedMonths = state.monthsModel.map((month, monthIndex) =>
formatDaysCalendar(month, getFormatOptions(state), monthIndex)
- 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 daySelectHandler
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
daySelectHandler(day: DayViewModel): void {
if (day.isOtherMonth || day.isDisabled) {
return;
}
- 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 monthsShortRegex
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
monthsShortRegex(isStrict: boolean): RegExp {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
this.computeMonthsParse();
}
- 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 changeTime
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function changeTime(value: Date, diff: Time): Date {
if (!value) {
return changeTime(createDate(new Date(), 0, 0, 0), diff);
}
- 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 ngOnInit
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
ngOnInit(): void {
if (typeof window !== 'undefined') {
this.classMap = this.elementRef.nativeElement.getAttribute('class') || '';
}
// watch for maxSize
- 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"