Showing 407 of 1,024 total issues
Consider simplifying this complex logical expression. Open
if (!(at === 'before' && !range && sibling === after) &&
!(at === 'after' && !range && sibling === before)) {
sourceBatch.remove(contentElement);
if (at === 'before') {
Consider simplifying this complex logical expression. Open
if (lastPosition.current &&
position &&
(lastPosition.current.top !== position.top ||
lastPosition.current.left !== position.left ||
lastPosition.current.width !== position.width ||
Consider simplifying this complex logical expression. Open
if (backdrop.color ||
(backdrop.image && backdrop.image.toString().startsWith('#'))) {
return {
type: 'color',
color: backdrop.color || backdrop.image
Consider simplifying this complex logical expression. Open
else if (section.backdrop?.color ||
(section.backdrop?.image && section.backdrop.image.toString().startsWith('#'))) {
return {
color: section.backdrop.color || section.backdrop.image
}
Consider simplifying this complex logical expression. Open
if (deleteCharacter(editor, node, path, /\n\n/) ||
deleteCharacter(editor, node, path, new RegExp(`^\n`)) ||
deleteCharacter(editor, node, path, new RegExp(`${shy}\\s`)) ||
deleteCharacter(editor, node, path, new RegExp(`^${shy}`)) ||
deleteCharacter(editor, node, path, new RegExp(`\\s${shy}`), 1) ||
Function initPlayer
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function initPlayer(player, getPlayerState, playerActions, prevFileId, fileId) {
Function deleteCharacter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function deleteCharacter(editor, node, path, regExp, offset = 0) {
Function getMotifAreaPadding
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
contentRequiresPadding, transitions, motifAreaDimension, backdropContentElement, empty
Function useScrollPosition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function useScrollPosition(effect, deps, element, useWindow, wait) {
Function className
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function className(isSectionSelected, transitionSelection, isHighlighted, isBackdropElementSelected, transitions) {
Function renderChapters
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderChapters(entryStructure,
currentSectionIndex,
setCurrentSection,
scrollTargetSectionIndex,
setScrollTargetSectionIndex) {
Method initialize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def initialize(entry, template, configuration, property_base_name, options)
Function fadeSound
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
fadeSound: function(media, endVolume, fadeTime) {
var fadeResolution = 10;
var startVolume = media.volume();
var steps = fadeTime / fadeResolution;
var leap = (endVolume - startVolume) / steps;
- 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 History
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const History = function(slideshow, adapter) {
slideshow.on('slideshowchangepage', function(event, options) {
var hash = slideshow.currentPage().attr('id');
if (options.back) {
- 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 selfClear
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function selfClear(items, index) {
const item = items[index];
const next = items[index + 1];
if (supportsWrappingAroundFloats(item) ||
- 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 comparator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
comparator: function(pageA, pageB) {
if (pageA.storylinePosition() > pageB.storylinePosition()) {
return 1;
}
else if (pageA.storylinePosition() < pageB.storylinePosition()) {
- 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 update
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
update: function() {
if (this.model) {
var stage = this.model.currentStage();
if (stage) {
- 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 FitViewport
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function FitViewport({file, aspectRatio, opaque, children, fill, scale = 1}) {
const {height} = useFullscreenDimensions();
if (!file && !aspectRatio) return 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 translateStatus
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
translateStatus: function(xhr) {
if (xhr.status === 401) {
return 'Sie müssen angemeldet sein, um diese Aktion auszuführen.';
}
else if (xhr.status === 403) {
- 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 initialize
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
initialize: function() {
this.listenTo(this, 'change:main', function(model, value) {
if (value) {
this.each(function(storyline) {
if (storyline.isMain() && storyline !== model) {
- 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"