Showing 142 of 210 total issues
Function default
has a Cognitive Complexity of 699 (exceeds 5 allowed). Consider refactoring. Open
export default function( revealElement, options ) {
// Support initialization with no args, one arg
// [options] or two args [revealElement, options]
if( arguments.length < 2 ) {
- 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 default
has 1558 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function( revealElement, options ) {
// Support initialization with no args, one arg
// [options] or two args [revealElement, options]
if( arguments.length < 2 ) {
File reveal.js
has 1589 lines of code (exceeds 250 allowed). Consider refactoring. Open
import SlideContent from './controllers/slidecontent.js'
import SlideNumber from './controllers/slidenumber.js'
import JumpToSlide from './controllers/jumptoslide.js'
import Backgrounds from './controllers/backgrounds.js'
import AutoAnimate from './controllers/autoanimate.js'
Function onDocumentKeyDown
has a Cognitive Complexity of 121 (exceeds 5 allowed). Consider refactoring. Open
onDocumentKeyDown( event ) {
let config = this.Reveal.getConfig();
// If there's a condition specified and it returns 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 Plugin
has a Cognitive Complexity of 93 (exceeds 5 allowed). Consider refactoring. Open
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
- 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 Plugin
has a Cognitive Complexity of 88 (exceeds 5 allowed). Consider refactoring. Open
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
- 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 Plugin
has 266 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
Function onTouchMove
has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring. Open
onTouchMove( event ) {
if( this.isSwipePrevented( event.target ) ) return true;
let config = this.Reveal.getConfig();
- 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 scrollview.js
has 493 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { HORIZONTAL_SLIDES_SELECTOR, HORIZONTAL_BACKGROUNDS_SELECTOR } from '../utils/constants.js'
import { queryAll } from '../utils/util.js'
const HIDE_SCROLLBAR_TIMEOUT = 500;
const MAX_PROGRESS_SPACING = 4;
Function update
has a Cognitive Complexity of 47 (exceeds 5 allowed). Consider refactoring. Open
update() {
let routes = this.Reveal.availableRoutes();
// Remove the 'enabled' class from all directions
- 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 zoom
has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring. Open
var zoom = (function(){
// The current zoom level (scale)
var level = 1;
- 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 Plugin
has 175 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Plugin = () => {
// The reveal.js instance this plugin is attached to
let deck;
Function onDocumentKeyDown
has 174 lines of code (exceeds 25 allowed). Consider refactoring. Open
onDocumentKeyDown( event ) {
let config = this.Reveal.getConfig();
// If there's a condition specified and it returns false,
Function Plugin
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
const Plugin = () => {
let connectInterval;
let speakerWindow = null;
let deck;
- 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 Plugin
has 148 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Plugin = () => {
let connectInterval;
let speakerWindow = null;
let deck;
Function load
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
load( slide, options = {} ) {
// Show the slide element
slide.style.display = this.Reveal.getConfig().display;
- 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 autoAnimateElements
has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring. Open
autoAnimateElements( from, to, elementOptions, animationOptions, id ) {
// 'from' elements are given a data-auto-animate-target with no value,
// 'to' elements are are given a data-auto-animate-target with an ID
from.dataset.autoAnimateTarget = '';
- 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 zoom
has 132 lines of code (exceeds 25 allowed). Consider refactoring. Open
var zoom = (function(){
// The current zoom level (scale)
var level = 1;
Function activate
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
async activate() {
const config = this.Reveal.getConfig();
const slides = queryAll( this.Reveal.getRevealElement(), SLIDES_SELECTOR )
Function syncPages
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
syncPages() {
const config = this.Reveal.getConfig();
const slideSize = this.Reveal.getComputedSlideSize( window.innerWidth, window.innerHeight );
- 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"