Showing 142 of 210 total issues
File backgrounds.js
has 264 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { queryAll } from '../utils/util.js'
import { colorToRgb, colorBrightness } from '../utils/color.js'
/**
* Creates and updates slide backgrounds.
Function update
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
update( index, fragments, slide = this.Reveal.getCurrentSlide() ) {
let changedFragments = {
shown: [],
hidden: []
- 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 sync
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
sync( slide ) {
const element = slide.slideBackgroundElement,
contentElement = slide.slideBackgroundContentElement;
- 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 configure
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
function configure( options ) {
const oldConfig = { ...config }
// New config options may be passed when this method
Function pages
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
this.pages = pageElements.map( pageElement => {
const page = this.createPage({
pageElement,
slideElement: pageElement.querySelector( 'section' ),
stickyElement: pageElement.querySelector( '.scroll-page-sticky' ),
File gulpfile.js
has 256 lines of code (exceeds 250 allowed). Consider refactoring. Open
const pkg = require('./package.json')
const glob = require('glob')
const yargs = require('yargs')
const through = require('through2');
const qunit = require('node-qunit-puppeteer')
Function updateSlidesVisibility
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
function updateSlidesVisibility() {
// Select all slides and convert the NodeList result to
// an array
let horizontalSlides = getHorizontalSlides(),
Function getHash
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getHash( slide ) {
let url = '/';
// Attempt to create a named link based on the slide's ID
- 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 goto
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
goto( index, offset = 0 ) {
let currentSlide = this.Reveal.getCurrentSlide();
if( currentSlide && this.Reveal.getConfig().fragments ) {
- 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 getSlideNumber
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
getSlideNumber( slide = this.Reveal.getCurrentSlide() ) {
let config = this.Reveal.getConfig();
let value;
let format = SLIDE_NUMBER_FORMAT_HORIZONTAL_DOT_VERTICAL;
- 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 startEmbeddedContent
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
startEmbeddedContent( element ) {
if( element && !this.Reveal.isSpeakerNotes() ) {
// Restart GIFs
Function MathJax3
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const MathJax3 = () => {
// The reveal.js instance this plugin is attached to
let deck;
Function getAutoAnimatableProperties
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
getAutoAnimatableProperties( direction, element, elementOptions ) {
let config = this.Reveal.getConfig();
let properties = { styles: [] };
Function update
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
update() {
let routes = this.Reveal.availableRoutes();
// Remove the 'enabled' class from all directions
Function MathJax2
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const MathJax2 = () => {
// The reveal.js instance this plugin is attached to
let deck;
Function run
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
run( fromSlide, toSlide ) {
// Clean up after prior animations
this.reset();
Function updateParallax
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
updateParallax() {
let indices = this.Reveal.getIndices();
if( this.Reveal.getConfig().parallaxBackgroundImage ) {
- 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 jump
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
jump() {
clearTimeout( this.jumpTimeout );
delete this.jumpTimeout;
- 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 startEmbeddedIframe
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
startEmbeddedIframe( event ) {
let iframe = event.target;
if( iframe && iframe.contentWindow ) {
- 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 run
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
run( fromSlide, toSlide ) {
// Clean up after prior animations
this.reset();
- 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"