ui/src/modules/settings/integrations/constants.ts

Summary

Maintainability
F
5 days
Test Coverage

File constants.ts has 393 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { __ } from 'modules/common/utils';

export const days = [
  { value: 'everyday', label: __('Everyday') },
  { value: 'weekdays', label: __('Weekdays') },
Severity: Minor
Found in ui/src/modules/settings/integrations/constants.ts - About 5 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    export const hours = [
      { value: '12:00 AM', label: '12:00 AM' },
      { value: '12:30 AM', label: '12:30 AM' },
      { value: '1:00 AM', label: '1:00 AM' },
      { value: '1:30 AM', label: '1:30 AM' },
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 1 other location - About 3 days to fix
    ui/src/modules/knowledgeBase/icons.constant.ts on lines 1..51

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 599.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    export const FORM_SUCCESS_ACTIONS = {
      EMAIL: 'email',
      REDIRECT: 'redirect',
      ONPAGE: 'onPage',
      ALL_LIST: [
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 3 other locations - About 1 hr to fix
    ui/src/modules/bookings/constants.tsx on lines 1..10
    ui/src/modules/companies/constants.ts on lines 49..59
    ui/src/modules/customers/constants.ts on lines 30..40

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 68.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Outlook by Nylas',
        description:
          'Connect a company email address such as sales@mycompany.com or info@mycompany.com',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Microsoft Exchange by Nylas',
        description:
          'Connect a company email address such as sales@mycompany.com or info@mycompany.com',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Facebook Messenger',
        description:
          'Connect and manage Facebook Messages right from your Team Inbox',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Office 365 by Nylas',
        description:
          'Connect a company email address such as sales@mycompany.com or info@mycompany.com',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'IMAP by Nylas',
        description:
          'Connect a company email address such as sales@mycompany.com or info@mycompany.com',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Messenger',
        description: 'See and reply to Messenger messages in your Team Inbox',
        inMessenger: false,
        isAvailable: true,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Gmail by Nylas',
        description:
          'Connect a company email address such as sales@mycompany.com or info@mycompany.com',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Facebook Post',
        description: 'Connect to Facebook posts right from your Team Inbox',
        inMessenger: false,
        isAvailable: true,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274
    ui/src/modules/settings/integrations/constants.ts on lines 275..287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 9 locations. Consider refactoring.
    Open

      {
        name: 'Yahoo by Nylas',
        description:
          'Connect a company email address such as sales@mycompany.com or info@mycompany.com',
        inMessenger: false,
    Severity: Major
    Found in ui/src/modules/settings/integrations/constants.ts and 8 other locations - About 35 mins to fix
    ui/src/modules/settings/integrations/constants.ts on lines 159..170
    ui/src/modules/settings/integrations/constants.ts on lines 171..183
    ui/src/modules/settings/integrations/constants.ts on lines 184..195
    ui/src/modules/settings/integrations/constants.ts on lines 210..222
    ui/src/modules/settings/integrations/constants.ts on lines 223..235
    ui/src/modules/settings/integrations/constants.ts on lines 236..248
    ui/src/modules/settings/integrations/constants.ts on lines 249..261
    ui/src/modules/settings/integrations/constants.ts on lines 262..274

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 47.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status