Showing 556 of 650 total issues
Function mergeProps
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function mergeProps(...args) {
const ret = extend({}, args[0]);
for (let i = 1; i < args.length; i++) {
const toMerge = args[i];
for (const key in toMerge) {
- 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 a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function getSequence(arr) {
const p = arr.slice();
const result = [0];
let i, j, u, v, c;
const len = arr.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 fillValues
has 76 lines of code (exceeds 25 allowed). Consider refactoring. Open
fillValues: function fillValues(forceEmit) {
var _this9 = this;
var fullValues = {};
var baseHour = this.hour;
Function extractComponentsGuards
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
function extractComponentsGuards(matched, guardType, to, from) {
const guards = [];
for (const record of matched) {
for (const name in record.components) {
let rawComponent = record.components[name];
Function 7dd0
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__("23e7");
Function resolvePropValue
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function resolvePropValue(options, props, key, value, instance, isAbsent) {
const opt = options[key];
if (opt != null) {
const hasDefault = hasOwn(opt, 'default');
// default values
- 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 traverseStaticChildren
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
function traverseStaticChildren(n1, n2, shallow = false) {
const ch1 = n1.children;
const ch2 = n2.children;
if (isArray(ch1) && isArray(ch2)) {
for (let i = 0; i < ch1.length; 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 pushWithRedirect
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
function pushWithRedirect(to, redirectedFrom) {
const targetLocation = (pendingLocation = resolve(to));
const from = currentRoute.value;
const data = to.state;
const force = to.force;
Function setup
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup(props, { attrs, slots }) {
warnDeprecatedUsage();
const injectedRoute = inject(routerViewLocationKey);
const routeToDisplay = computed(() => props.route || injectedRoute.value);
const depth = inject(viewDepthKey, 0);
Function trigger
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function trigger(target, type, key, newValue, oldValue, oldTarget) {
const depsMap = targetMap.get(target);
if (!depsMap) {
// never been tracked
return;
Function addRoute
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function addRoute(record, parent, originalRecord) {
// used later on to remove by name
let isRootAdd = !originalRecord;
let mainNormalizedRecord = normalizeRouteRecord(record);
// we might be the child of an alias
Function generate
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generate(ast, options = {}) {
const context = createCodegenContext(ast, options);
if (options.onContextCreated)
options.onContextCreated(context);
const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
Function get
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
get({ _: instance }, key) {
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
// let @vue/reactivity know it should never observe Vue public instances.
if (key === "__v_skip" /* SKIP */) {
return true;
Function setup
has 69 lines of code (exceeds 25 allowed). Consider refactoring. Open
setup(props, { slots }) {
const instance = getCurrentInstance();
const state = useTransitionState();
let prevTransitionKey;
return () => {
Function setupStatefulComponent
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function setupStatefulComponent(instance, isSSR) {
const Component = instance.type;
{
if (Component.name) {
validateComponentName(Component.name, instance.appContext.config);
- 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 updateSlots
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
const updateSlots = (instance, children, optimized) => {
const { vnode, slots } = instance;
let needDeletionCheck = true;
let deletionComparisonTarget = EMPTY_OBJ;
if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
- 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 patchStyle
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
function patchStyle(el, prev, next) {
const style = el.style;
if (!next) {
el.removeAttribute('style');
}
- 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 transformFor
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => {
const { helper, removeHelper } = context;
return processFor(node, dir, context, forNode => {
// create the loop render function expression now, and add the
// iterator on exit after all children have been traversed
Function process
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
const disabled = isTeleportDisabled(n2.props);
let { shapeFlag, children, dynamicChildren } = n2;
// #3302
Function 4d63
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__("83ab");
var global = __webpack_require__("da84");
var isForced = __webpack_require__("94ca");