Showing 4,841 of 7,782 total issues
Function _removeWrapper
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_removeWrapper(element: JQuery): JQuery {
var active = document.activeElement,
wrapped = element.children('.ui-effects-wrapper');
if (wrapped.length) {
var children = wrapped.contents();
- 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 vparentNode
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
vparentNode(real?: boolean): HTMLElement | undefined {
var el = this.jq[0];
if (el) {
let v = el['z_vp'] as undefined | string; //might be empty
if (v) return jq('#' + v)[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 vflexHeight
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
vflexHeight(): number {
var el = this.jq[0],
parent = el.parentElement,
hgh = parent ? zk(parent).clientHeightDoubleValue() : 0,
zkp: undefined | zk.JQZK;
- 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 _redoCSS0
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function _redoCSS0(): void {
if (_rdcss.length) {
for (var el: HTMLElement | undefined; el = _rdcss.pop();)
try {
zjq._fixCSS(el);
- 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 getAnimationSpeed
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getAnimationSpeed(defaultValue?: 'slow' | 'fast' | number): 'slow' | 'fast' | number {
var animationSpeed = jq(this.$().$n()).closest('[data-animationspeed]').data('animationspeed') as string | number,
jqSpeed = jq.fx.speeds;
if (typeof animationSpeed === 'string') {
- 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 endeffect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function endeffect(dg: zk.Draggable): void {
var ctrl = dg.control as unknown as zul.WScroll;
if (dg._timer) {
clearTimeout(dg._timer);
}
- 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 renType
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
renType(url: string, type: string): string {
var j = url.lastIndexOf(';'),
suffix;
if (j >= 0) {
suffix = url.substring(j);
- 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 getParentFunctionIdentifier
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
getParentFunctionIdentifier: function (node: TSESTree.Node): TSESTree.Node | null {
// We'll want to get the closest function.
let func: TSESTree.Node | undefined = node;
- 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 destroyProgressbox
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
static destroyProgressbox(id: string, opts?: Partial<ProgressboxOptions>): void {
if (opts?.busy && --zk.busy < 0)
zk.busy = 0;
var $n = jq(id, zk), n: HTMLElement & {z_mask?: zk.eff.Effect} | zk.eff.Effect;
if ($n.length) {
- 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 _mousewheelY
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
_mousewheelY(evt: zk.Event, delta: number, deltaX: number, deltaY: number): void {
var opts = this.opts,
step = opts.step * opts.wheelAmountStep,
pos = this._pos![1],
barPos: number;
- 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 create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
create(context) {
const sourceCode = context.getSourceCode();
return {
CallExpression(node) {
const { callee } = node;
- 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 create
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
create(context) {
return {
PropertyDefinition(node) {
// for zk.$void case
- 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
Avoid too many return
statements within this method. Open
return negative ? (sec1 - sec2) : (sec2 - sec1);
Avoid too many return
statements within this method. Open
if (v1[j] > v2[j]) return 1;
Avoid too many return
statements within this method. Open
if (v1[j] < v2[j]) return -1;
Avoid too many return
statements within this method. Open
return rtn;
Avoid too many return
statements within this method. Open
if (v1[j] < 0) return -1;
Avoid too many return
statements within this method. Open
return negative ?
(date1.getTime() - date2.getTime()):
(date2.getTime() - date1.getTime());
Avoid too many return
statements within this method. Open
return 0;
Avoid too many return
statements within this method. Open
return negative ? -days : days;