Showing 556 of 650 total issues
Function transformExpression
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const transformExpression = (node, context) => {
if (node.type === 5 /* INTERPOLATION */) {
node.content = processExpression(node.content, context);
}
else if (node.type === 1 /* ELEMENT */) {
- 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 compileToFunction
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function compileToFunction(template, options) {
if (!isString(template)) {
if (template.nodeType) {
template = template.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 normalizeEmitsOptions
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function normalizeEmitsOptions(comp, appContext, asMixin = false) {
const cache = appContext.emitsCache;
const cached = cache.get(comp);
if (cached !== undefined) {
return cached;
- 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 useHistoryStateNavigation
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function useHistoryStateNavigation(base) {
const { history, location } = window;
// private variables
let currentLocation = {
value: createCurrentLocation(base, location),
- 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 normalizeQuery
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function normalizeQuery(query) {
const normalizedQuery = {};
for (let key in query) {
let value = query[key];
if (value !== undefined) {
- 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 isEnd
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function isEnd(context, mode, ancestors) {
const s = context.source;
switch (mode) {
case 0 /* DATA */:
if (startsWith(s, '</')) {
- 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 normalizeStyle
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
function normalizeStyle(value) {
if (isArray(value)) {
const res = {};
for (let i = 0; i < value.length; i++) {
const item = value[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 useLink
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function useLink(props) {
const router = inject(routerKey);
const currentRoute = inject(routeLocationKey);
const route = computed(() => router.resolve(unref(props.to)));
const activeRecordIndex = computed(() => {
Function scrollToPosition
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function scrollToPosition(position) {
let scrollToOptions;
if ("el" in position) {
let positionEl = position.el;
const isIdSelector =
Function getTransitionInfo
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function getTransitionInfo(el, expectedType) {
const styles = window.getComputedStyle(el);
// JSDOM may return undefined for transition properties
const getStyleProperties = (key) => (styles[key] || '').split(', ');
const transitionDelays = getStyleProperties(TRANSITION + 'Delay');
Function hourRangeIn24HrFormat
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
hourRangeIn24HrFormat: function hourRangeIn24HrFormat() {
var _this2 = this;
if (!this.hourType || !this.opts.hourRange) {
return false;
Function 99af
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__("23e7");
Function b727
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
var bind = __webpack_require__("0366");
var IndexedObject = __webpack_require__("44ad");
var toObject = __webpack_require__("7b0b");
Function shouldUpdateComponent
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
const { props: prevProps, children: prevChildren, component } = prevVNode;
const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
const emits = component.emitsOptions;
// Parent component's render function was hot-updated. Since this may have
Function debugLog
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
debugLog: function debugLog(logText) {
var _this20 = this;
if (!logText || !logText.length) {
return;
Function cmd_enter
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
cmd_enter() {
if (this.value) {
this.history_[this.history_.length] = this.value;
this.histpos_ = this.history_.length;
}
Function patchDOMProp
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
function patchDOMProp(el, key, value,
// the following args are passed only due to potential innerHTML/textContent
// overriding existing VNodes, in which case the old tree must be properly
// unmounted.
prevChildren, parentComponent, parentSuspense, unmountChildren) {
Function 60da
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__("83ab");
Function splice
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
splice: function splice(start, deleteCount /* , ...items */) {
var O = toObject(this);
var len = toLength(O.length);
var actualStart = toAbsoluteIndex(start, len);
var argumentsLength = arguments.length;
Function parseForExpression
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function parseForExpression(input, context) {
const loc = input.loc;
const exp = input.content;
const inMatch = exp.match(forAliasRE);
if (!inMatch)
- 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"