Showing 286 of 880 total issues
Function resolve
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
function resolve(to, base) {
// /foo/bar, /baz/qux => /foo/bar
if (startsWith(to, "/")) {
return to;
}
- 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 deeply nested control flow statements. Open
if (partialState != null) {
if (dontMutate) {
dontMutate = false;
nextState = Object.assign({}, nextState, partialState);
} else {
Function boundingClientRect
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
SelectorQuery.prototype.boundingClientRect = function() {
if (!this.__consumed) {
if (!this.__node) {
this.__missions.push(null);
} else {
- 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 scrollOffset
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
SelectorQuery.prototype.scrollOffset = function() {
if (!this.__consumed) {
if (!this.__node) {
this.__missions.push(null);
} else {
- 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 setModernOffsets
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function setModernOffsets(node, offsets) {
if (!window.getSelection) {
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
Avoid deeply nested control flow statements. Open
if (boundary.return.child == boundary) {
boundary.return.child = f;
}
Function batchedUpdates
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Renderer.batchedUpdates = function(callback, event) {
let keepbook = isBatching;
isBatching = true;
try {
event && Renderer.fireMiddlewares(true);
- 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 arc
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
x,
y,
r,
sAngle,
eAngle,
Function workLoop
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function workLoop(deadline) {
let fiber = macrotasks.shift(),
info;
if (fiber) {
if (fiber.type === Unbatch) {
- 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 createEvent
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function createEvent(e, target, type) {
var event = {};
for (var i in e) {
if (i.indexOf('_') !== 0) {
event[i] = e[i];
- 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 insertElement
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
insertElement(fiber) {
let dom = fiber.stateNode,
parentNode = fiber.parent,
forwardFiber = fiber.forwardFiber,
before = forwardFiber ? forwardFiber.stateNode : 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"
Further reading
Function bezierCurveTo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
CanvasContext.prototype.bezierCurveTo = function(cp1x, cp1y, cp2x, cp2y, x, y) {
Function setTransform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
scaleX,
skewX,
skewY,
scaleY,
translateX,
Function textarea
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
textarea(props, inst) {
let initialValue = props.value;
if (initialValue == null) {
let defaultValue = props.defaultValue;
// TODO (yungsters): Remove support for children content in <textarea>.
- 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 deeply nested control flow statements. Open
if (
hook == "componentWillUnmount" ||
hook == "componentDidUpdate"
) {
boundary.effectTag = CAPTURE;
Function useCallbackImpl
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function useCallbackImpl(create, deps, isMemo, isEffect) {//ok
let fiber = getCurrentFiber();
let key = getCurrentKey();
let updateQueue = fiber.updateQueue;
- 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 createOpenTagMarkup
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
tagVerbatim,
tagLowercase,
props,
namespace,
makeStaticMarkup,
Function initStorageSync
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function initStorageSync (storageCache) {
if (typeof ReactQuick !== 'object') {
return;
}
var apis = ReactQuick.api; // eslint-disable-line
- 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 coolieMethod
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function coolieMethod(input, success, fail, complete, method, msg) {
Function transform
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
scaleX,
skewX,
skewY,
scaleY,
translateX,