Showing 650 of 650 total issues
Function formatProp
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
function formatProp(key, value, raw) {
if (isString(value)) {
value = JSON.stringify(value);
return raw ? value : [`${key}=${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 setupStatefulComponent
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function setupStatefulComponent(instance, isSSR) {
const Component = instance.type;
{
if (Component.name) {
validateComponentName(Component.name, instance.appContext.config);
Function 8875
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// addapted from the document.currentScript polyfill by Adam Miller
// MIT license
// source: https://github.com/amiller-gh/currentScript-polyfill
Function 69f3
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_WEAK_MAP = __webpack_require__("7f9a");
var global = __webpack_require__("da84");
var isObject = __webpack_require__("861d");
Function resolve
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function resolve(location, currentLocation) {
let matcher;
let params = {};
let path;
let name;
Function formatRouteRecordMatcherForStateInspector
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function formatRouteRecordMatcherForStateInspector(route) {
const { record } = route;
const fields = [{ editable: false, key: "path", value: record.path }];
if (record.name != null) {
fields.push({
Function hydrateElement
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
optimized = optimized || !!vnode.dynamicChildren;
const { props, patchFlag, shapeFlag, dirs } = vnode;
// skip props & children if this is hoisted static nodes
if (patchFlag !== -1 /* HOISTED */) {
Function walk
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
function walk(node, context, doNotHoistNode = false) {
let hasHoistedNode = false;
// Some transforms, e.g. transformAssetUrls from @vue/compiler-sfc, replaces
// static bindings with expressions. These expressions are guaranteed to be
// constant so they are still eligible for hoisting, but they are only
Function transformOn
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
const transformOn = (dir, node, context, augmentor) => {
const { loc, modifiers, arg } = dir;
if (!dir.exp && !modifiers.length) {
context.onError(createCompilerError(34 /* X_V_ON_NO_EXPRESSION */, loc));
}
Function 7c73
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__("825a");
var defineProperties = __webpack_require__("37e8");
var enumBugKeys = __webpack_require__("7839");
Function exports
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
createIteratorConstructor(IteratorConstructor, NAME, next);
var getIterationMethod = function (KIND) {
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
Function mountElement
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
let el;
let vnodeHook;
const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode;
{
Function genNode
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function genNode(node, context) {
if (isString(node)) {
context.push(node);
return;
}
Function resolveComponentType
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function resolveComponentType(node, context, ssr = false) {
let { tag } = node;
// 1. dynamic component
const isExplicitDynamic = isComponentTag(tag);
const isProp = findProp(node, 'is') || (!isExplicitDynamic && findDir(node, 'is'));
- 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 transformOn$1
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
const transformOn$1 = (dir, node, context) => {
return transformOn(dir, node, context, baseResult => {
const { modifiers } = dir;
if (!modifiers.length)
return baseResult;
- 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 useHistoryListeners
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function useHistoryListeners(base, historyState, currentLocation, replace) {
let listeners = [];
let teardowns = [];
// TODO: should it be a stack? a Dict. Check if the popstate listener
// can trigger twice
- 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 formatComponentName
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function formatComponentName(instance, Component, isRoot = false) {
let name = getComponentName(Component);
if (!name && Component.__file) {
const match = Component.__file.match(/([^/\\]+)\.\w+$/);
if (match) {
- 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 parseQuery
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function parseQuery(search) {
const query = {};
// avoid creating an object with an empty key and empty value
// because of split('&')
if (search === "" || search === "?") return query;
- 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 exports
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = function (KEY, length, exec, sham) {
var SYMBOL = wellKnownSymbol(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
Function resolve
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
resolve(resume = false) {
{
if (!resume && !suspense.pendingBranch) {
throw new Error(`suspense.resolve() is called without a pending branch.`);
}