Showing 451 of 1,081 total issues
Function HashAdapter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const HashAdapter = function() {
var counter = 0;
this.back = function() {
if (counter > 0) {
Function PushStateAdapter
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const PushStateAdapter = function() {
var counter = 0;
this.back = function() {
if (counter > 0) {
Function renderFile
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderFile(props) {
if (props.pageIsPrepared) {
const FilePlayer = props.playerComponent;
return (
Function configurationEditor
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
configurationEditor({entry}) {
this.tab('general', function() {
this.input('source', TextInputView);
this.input('requireConsent', CheckBoxInputView);
this.view(InfoBoxView, {
Function renderVendors
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderVendors() {
if (!this.props.vendors.length) {
return (
<div className="consent_vendor_list-blank">
{this.props.t('pageflow.public.consent_no_vendors')}
Function appendViewerTo
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function appendViewerTo(parentNode) {
if (!elRef.current) {
elRef.current = document.createElement('div');
elRef.current.className = styles.full;
Function toolbarButtons
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
function toolbarButtons() {
return [
{
name: 'text',
text: 'Text',
Function getBackdropAttribute
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getBackdropAttribute(nextAttributes) {
switch (nextAttributes.backdropType) {
case 'color':
return {
color: nextAttributes.backdropColor
Function getUnusedEffects
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
getUnusedEffects() {
const effects = this;
const unusedEffects = new Backbone.Collection(
Effect.names
.filter(name => !this.findWhere({name}))
Function set
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
set: function(name, value) {
let attrs;
if (typeof name === 'object') {
attrs = name;
Function useBackdrop
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function useBackdrop(section) {
const videoBackdrop = useFileBackdrop({
section,
collectionName: 'videoFiles',
propertyName: 'video'
Function require
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
require(vendorName) {
if (this.inEditor) {
return Promise.resolve('fulfilled');
}
Function allocatePlayer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
allocatePlayer({
playerType, playerId, playsInline, mediaEventsContextData,
hooks, poster, loop = false, controls = false, altText,
onRelease
}) {
Function constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
constructor(props, context) {
super(props, context);
this.state = {
subMenuVisible: false
- 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 backgroundImageInlineStyles
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function backgroundImageInlineStyles({firstPageBackgroundImageUrlMedium, firstPageBackgroundImageUrlLarge, backgroundImage, blurStrength, backgroundImageX, backgroundImageY}) {
var backgroundPosition = {
x: backgroundImageX != undefined ? backgroundImageX : 50,
y: backgroundImageY != undefined ? backgroundImageY : 50
- 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 constructor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
constructor(props, context) {
super(props, context);
this.state = {
handleWidth: null,
- 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 hideText
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const hideText = (function() {
function element() {
return $('body');
}
- 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 getLifecycleHandlers
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export function getLifecycleHandlers(configuration, playerActions) {
return {
onVisible() {
if (configuration.playbackMode === 'loop') {
playerActions.play();
- 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 DelayedStart
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const DelayedStart = (function($) {
return function() {
var waitDeferred = new $.Deferred();
var promises = [];
var performed = false;
- 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 getBoundingBox
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
function getBoundingBox(polygon) {
if (polygon.length === 0) {
return null;
}
- 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"