Showing 266 of 572 total issues
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return tag;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return "[..(" + value.byteLength + ")..]";
Avoid too many return
statements within this function. Open
return gl.getParameter(WebGlConstants.PIXEL_UNPACK_BUFFER_BINDING.value);
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
return "[..(" + value.length + ")..]";
Avoid too many return
statements within this function. Open
return value;
Avoid too many return
statements within this function. Open
return a === b;
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return newValue;
Avoid too many return
statements within this function. Open
return value.src;
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return undefined;
Avoid too many return
statements within this function. Open
return gl.getParameter(WebGlConstants.PIXEL_PACK_BUFFER_BINDING.value);
Function render
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public render(state: IResultViewMenuState, stateId: number): Element {
const htmlString = this.htmlTemplate`<ul class="resultViewMenuComponent">
<li class="resultViewMenuOpen resultViewMenuSmall"><a href="#" role="button">Menu</a></li>
- 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 scrollIntoView
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static scrollIntoView(element: HTMLElement): void {
const elementRect = element.getBoundingClientRect();
let parentElement = element.parentElement;
while (parentElement) {
- 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 showError
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public showError(errorMessage: string) {
if (!this.editor) {
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"