Showing 556 of 650 total issues
Function load
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const load = () => {
let thisRequest;
return (pendingRequest ||
(thisRequest = pendingRequest = loader()
.catch(err => {
Function looseEqual
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function looseEqual(a, b) {
if (a === b)
return true;
let aValidType = isDate(a);
let bValidType = isDate(b);
Function renderList
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function renderList(source, renderItem) {
let ret;
if (isArray(source) || isString(source)) {
ret = new Array(source.length);
for (let i = 0, l = source.length; i < l; i++) {
Function 466d
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__("d784");
Function validHoursList
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validHoursList: function validHoursList() {
var _this3 = this;
if (!this.manualInput) {
return false;
Consider simplifying this complex logical expression. Open
Open
if (!prev ||
!next ||
(!preserve &&
(prev.type === 3 /* COMMENT */ ||
next.type === 3 /* COMMENT */ ||
Consider simplifying this complex logical expression. Open
Open
if (!hasText ||
// if this is a plain element with a single text child, leave it
// as-is since the runtime has dedicated fast path for this by directly
// setting textContent of the element.
// for component root it's always normalized anyway.
Consider simplifying this complex logical expression. Open
Open
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !(
REPLACE_SUPPORTS_NAMED_GROUPS &&
Consider simplifying this complex logical expression. Open
Open
if (this.inUse.hour && !this.hour || this.inUse.minute && !this.minute || this.inUse.second && !this.second || this.inUse.apm && !this.apm) {
return false;
}
Function handleRedirectRecord
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleRedirectRecord(to) {
const lastMatched = to.matched[to.matched.length - 1];
if (lastMatched && lastMatched.redirect) {
const { redirect } = lastMatched;
let newTargetLocation =
Function updateSlots
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateSlots = (instance, children, optimized) => {
const { vnode, slots } = instance;
let needDeletionCheck = true;
let deletionComparisonTarget = EMPTY_OBJ;
if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
Function mountComponent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense));
if (instance.type.__hmrId) {
registerHMR(instance);
}
Function fdbc
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports) {
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
Function created
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
created(el, _, vnode) {
el._assign = getModelAssigner(vnode);
addEventListener(el, 'change', () => {
const modelValue = el._modelValue;
const elementValue = getValue(el);
Function patchChildren
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
const c1 = n1 && n1.children;
const prevShapeFlag = n1 ? n1.shapeFlag : 0;
const c2 = n2.children;
const { patchFlag, shapeFlag } = n2;
Function buildDirectiveArgs
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildDirectiveArgs(dir, context) {
const dirArgs = [];
const runtime = directiveImportMap.get(dir);
if (runtime) {
// built-in directive with runtime
Function 1c7e
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__("b622");
var ITERATOR = wellKnownSymbol('iterator');
Function e260
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__("fc6a");
Function includesParams
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
function includesParams(outer, inner) {
for (let key in inner) {
let innerValue = inner[key];
let outerValue = outer[key];
if (typeof innerValue === "string") {
- 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 genNodeList
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
function genNodeList(nodes, context, multilines = false, comma = true) {
const { push, newline } = context;
for (let i = 0; i < nodes.length; i++) {
const node = nodes[i];
if (isString(node)) {
- 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"