Showing 556 of 650 total issues
Function stringifyQuery
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function stringifyQuery(query) {
let search = "";
for (let key in query) {
const value = query[key];
key = encodeQueryKey(key);
- 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 traverse
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function traverse(value, seen = new Set()) {
if (!isObject(value) ||
seen.has(value) ||
value["__v_skip" /* SKIP */]) {
return value;
- 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 shouldSetAsProp
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function shouldSetAsProp(el, key, value, isSVG) {
if (isSVG) {
// most keys must be set as attribute on svg elements to work
// ...except innerHTML
if (key === 'innerHTML') {
- 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 patchAttr
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function patchAttr(el, key, value, isSVG, instance) {
if (isSVG && key.startsWith('xlink:')) {
if (value == null) {
el.removeAttributeNS(xlinkNS, key.slice(6, key.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 cmd_enter
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
cmd_enter() {
if (this.value) {
this.history_[this.history_.length] = this.value;
this.histpos_ = this.history_.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 getSequence
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getSequence(arr) {
const p = arr.slice();
const result = [0];
let i, j, u, v, c;
const len = arr.length;
Function normalizeChildren
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normalizeChildren(vnode, children) {
let type = 0;
const { shapeFlag } = vnode;
if (children == null) {
children = null;
Function setKbInput
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
setKbInput: function setKbInput(value) {
value = value || this.kbInputLog;
var currentChunk = this.getCurrentTokenChunk();
if (!currentChunk || !value || !value.length) {
Function tokenChunksPos
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
tokenChunksPos: function tokenChunksPos() {
var _this4 = this;
if (!this.manualInput) {
return false;
Function normalizeEmitsOptions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
const cache = appContext.emitsCache;
const cached = cache.get(comp);
if (cached !== undefined) {
return cached;
Function registerDep
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
registerDep(instance, setupRenderEffect) {
const isInPendingSuspense = !!suspense.pendingBranch;
if (isInPendingSuspense) {
suspense.deps++;
}
Function enter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
enter(el) {
let hook = onEnter;
let afterHook = onAfterEnter;
let cancelHook = onEnterCancelled;
if (!state.isMounted) {
Function genFunctionExpression
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genFunctionExpression(node, context) {
const { push, indent, deindent, scopeId, mode } = context;
const { params, returns, body, newline, isSlot } = node;
if (isSlot) {
// wrap slot functions with owner context
Function processFragment
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText(''));
const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));
let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
if (dynamicChildren) {
Function processSlotOutlet
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
function processSlotOutlet(node, context) {
let slotName = `"default"`;
let slotProps = undefined;
const nonNameProps = [];
for (let i = 0; i < node.props.length; i++) {
Function transformModel
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const transformModel = (dir, node, context) => {
const { exp, arg } = dir;
if (!exp) {
context.onError(createCompilerError(40 /* X_V_MODEL_NO_EXPRESSION */, dir.loc));
return createTransformProps();
Function resolveModifiers
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const resolveModifiers = (key, modifiers, context, loc) => {
const keyModifiers = [];
const nonKeyModifiers = [];
const eventOptionModifiers = [];
for (let i = 0; i < modifiers.length; i++) {
Function createGetter
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createGetter(isReadonly = false, shallow = false) {
return function get(target, key, receiver) {
if (key === "__v_isReactive" /* IS_REACTIVE */) {
return !isReadonly;
}
Function compileToFunction
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
function compileToFunction(template, options) {
if (!isString(template)) {
if (template.nodeType) {
template = template.innerHTML;
}
Function header
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
header(obj) {
// TODO also format ComponentPublicInstance & ctx.slots/attrs in setup
if (!isObject(obj)) {
return null;
}