Showing 451 of 1,081 total issues
Function Selection
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function Selection(props) {
const editor = useSlate();
const {t} = useI18n({locale: 'ui'});
const ref = useRef()
Function _create
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var element = this.element;
var options = this.options;
var scroller = options.scroller;
var links = element.find('a[href]');
Function _create
has 102 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var that = this,
scroller,
chapterParts = $('.ov_chapter', this.element),
pages = $('.ov_page', this.element),
Function onRender
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
onRender: function () {
const options = this.options;
const configurationEditor = new ConfigurationEditorView({
model: this.model,
Function _create
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var player = this.options.player;
var playButton = this.element.find('.vjs-play-control');
var progressHolder = this.element.find('.vjs-progress-holder');
Function StorylineOrdering
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const StorylineOrdering = function(storylines, pages) {
var storylinesByParent;
this.watch = function() {
storylines.on('add change:configuration', function() {
Function Lazy
has 94 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const Lazy = function(template, options) {
var placeholder = $('<span class="video_placeholder" />'),
that = this,
readyCallbacks = new $.Callbacks(),
disposeTimeout, videoTag, videoPlayer, html;
Function _create
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
_create: function() {
var parent = this.options.parent,
direction = this.element.data('direction'),
boundary = boundaries[direction],
that = this,
Function Slideshow
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export const Slideshow = function($el, configurations) {
var transitioning = false,
currentPage = $(),
pages = $(),
that = this,
- 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 DomOrderScrollNavigator
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const DomOrderScrollNavigator = function(slideshow, entryData) {
this.getLandingPage = function(pages) {
return pages.first();
};
Function browser
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const browser = (function(){
var tests = {},
results = {},
featureDetectionComplete = false;
Function Batch
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export function Batch(entry, section) {
// Shallow copy of the section's list of content elements to store
// ordering changes and newly inserted content elements.
const contentElements = section.contentElements.toArray();
- 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
Method build
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
def build(entry)
embedded_index_table entry.revisions, :blank_slate_text => I18n.t('pageflow.admin.entries.no_revisions') do
scope(:publications)
scope(:publications_and_user_snapshots)
scope(:frozen)
- 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 onRender
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
onRender: function() {
var entry = this.model;
var state = this.options.state || {};
var features = this.options.features || {};
var editor = this.options.editor || {};
File rollup.config.js
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
import alias from '@rollup/plugin-alias';
import jst from 'rollup-plugin-jst';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import replace from '@rollup/plugin-replace';
Function withVisibilityWatching
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export default function withVisibilityWatching(Component) {
return class VisibilityWatcher extends React.Component {
constructor(props) {
super(props);
- 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 DomOrderScrollNavigator
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export const DomOrderScrollNavigator = function(slideshow, entryData) {
this.getLandingPage = function(pages) {
return pages.first();
};
- 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
File PageThumbnail-spec.jsx
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {PageThumbnail} from '../PageThumbnail';
import fileExistsFn from 'support/fileExistsFn';
import {shallow} from 'enzyme';
Class Revision
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class Revision < ApplicationRecord
include SerializedConfiguration
PAGE_ORDER = [
'pageflow_storylines.position ASC',
Class EntryPolicy
has 27 methods (exceeds 20 allowed). Consider refactoring. Open
class EntryPolicy < ApplicationPolicy
class Scope < Scope
attr_reader :user, :scope, :query
def initialize(user, scope)