Showing 30 of 270 total issues
Function list
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function list() {
/* @desc list all public tasks */
var tasks = Object.keys(gulp.tasks || {})
.reduce(function (results, taskName) {
var task = gulp.tasks[taskName];
Function onMatchMedia
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onMatchMedia() {
const {
elements,
players,
settings,
Function playerStub
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const playerStub = options => {
const _state = {
currentTime: 0,
activeDuration: 0,
playState: 'running'
Function getPlayer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function getPlayer(element, settings, window = global.window, document = global.document) {
// Read all animation related styles from element, respect prefixes
const {
name,
duration,
Function exports
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (options) {
options = Object.assign({}, defaults, options);
return function (err) {
if (!err) {
Function exports
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (props) {
return function (image, headline, navigation) {
image = image || {
href: props.pkg.homepage,
src: props.pkg.logo
Function build
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
return function build(done) {
return sequence(
task(clean),
[
task(copy),
Function initPlayer
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
export default function initPlayer(element, keyframes, options, render, window = global.window, document = global.document) {
Function exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function (gulp, paths) {
const props = {
paths: paths,
gulp: gulp,
pkg: merge({}, pkg, pkg.config.documentation),
- 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 exports
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
Open
module.exports = function (gulp, paths) {
'use strict';
function toHtml() {
const rewrite = function () {
return function (ast, file) {
- 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"