Showing 10 of 38 total issues
File timeously.js
has 667 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! timeously v0.2.2 (Sat, 7 Apr 2018 02:09:32)
Timeous interval creation for precise milestone events
@module timeously
@author Ashley Brener <ashley@frisb.com>
Function TimeBucket
has 165 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var TimeBucket = function () {
function TimeBucket(date) {
(0, _classCallCheck3.default)(this, TimeBucket);
if (!date) {
Function Timeously
has 162 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var Timeously = function () {
function Timeously(options, callback) {
(0, _classCallCheck3.default)(this, Timeously);
var name = options.name,
interval = options.interval,
Function calculateNextTimeout
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
Open
calculateNextTimeout() {
let {name, title, interval, intervalType, started, now, startTime, stopTime} = this;
let limit = getLimit(intervalType, now);
- 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
TimeBucket
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export default class TimeBucket {
constructor(date) {
if (!date) {
date = new Date();
}
Function exports
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
headline: '<%= pkg.name %> v<%= pkg.version %> (<%= grunt.template.today("ddd, d mmm yyyy hh:MM:ss") %>)',
license: grunt.file.read('LICENSE'),
Function calculateNextTimeout
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
value: function calculateNextTimeout() {
var name = this.name,
title = this.title,
interval = this.interval,
intervalType = this.intervalType,
Function calculateNextTimeout
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
calculateNextTimeout() {
let {name, title, interval, intervalType, started, now, startTime, stopTime} = this;
let limit = getLimit(intervalType, now);
Function TimeSpan
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var TimeSpan = function () {
function TimeSpan(millisec) {
(0, _classCallCheck3.default)(this, TimeSpan);
Function $export
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var $export = function (type, name, source) {
var IS_FORCED = type & $export.F;
var IS_GLOBAL = type & $export.G;
var IS_STATIC = type & $export.S;
var IS_PROTO = type & $export.P;