Showing 10 of 45 total issues
Function createPropertyDescriptor
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function createPropertyDescriptor(property, opts) {
const dataKey = `__${property}`;
return {
get() {
let 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 createCoreTooltip
has 11 arguments (exceeds 4 allowed). Consider refactoring. Open
function createCoreTooltip(content, openDelay, closeDelay, placement,
focusable, forID, offset, effect, noVisibleArrow, manual, disabled) {
Function createPropertyDescriptor
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function createPropertyDescriptor(property, opts) {
const dataKey = `__${property}`;
return {
get() {
let value;
Function createCoreSlider
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
function createCoreSlider(value, min, max, step, color, vertical, rainbow, disabled) {
Function requestPropertyUpdate
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function requestPropertyUpdate(element, property, opts, oldValue, newValue, side) {
Function cleanupInputEventListeners
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function cleanupInputEventListeners(e, upEvent, upListener, moveEvent, moveListener) {
Function createCoreLink
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function createCoreLink(textContent, href, type, underline, disabled) {
Function setupInputEventListeners
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function setupInputEventListeners(e, upEvent, upListener, moveEvent, moveListener) {
Function updateThumbPosition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
updateThumbPosition(value) {
// Calculates the value with respect to the defined range (from this.min and this.max)
const stepSize = this.step;
const minValue = this.min;
const maxValue = this.max;
- 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 addProperty
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function addProperty(element, property, opts) {
const propertyDescriptor = createPropertyDescriptor(property, opts);
// Upgrade initially set property. So any properties defined in the constructor (or earlier by
// other frameworks) are treated as default values for the new created property.
- 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"