johnjones4/InBrief

View on GitHub
src/lib/services/Tasks.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function fetchAsana has 59 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  fetchAsana ({now, tonight, friday}, api) {
    if (api.token || api.refreshToken) {
      let client
      return (() => {
        if (api.refreshToken) {
Severity: Major
Found in src/lib/services/Tasks.js - About 2 hrs to fix

    Function fetchTodoist has 57 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      fetchTodoist ({now, tonight, friday}, api) {
        if (api.token || api.refreshToken) {
          const todoistRequest = (uri, params) => {
            params.token = api.token
            return request({
    Severity: Major
    Found in src/lib/services/Tasks.js - About 2 hrs to fix

      Function exec has 29 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        exec () {
          const now = new Date()
          const tonight = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 59, 59, 999)
          const dayOfWeek = tonight.getDay()
          const friday = new Date(tonight.getTime() + ((5 - dayOfWeek) * (1000 * 60 * 60 * 24)))
      Severity: Minor
      Found in src/lib/services/Tasks.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status