john-d-pelingo/react-twitch-streamers

View on GitHub

Showing 418 of 418 total issues

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

      cy.get('.ls-btn')
        .click()
        .should(function () {
          expect(localStorage.getItem('prop1')).to.eq('red')
          expect(localStorage.getItem('prop2')).to.eq('blue')
Severity: Major
Found in cypress/integration/example.spec.back.js and 1 other location - About 3 hrs to fix
cypress/integration/example.spec.back.js on lines 1170..1176

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 114.

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 2 locations. Consider refactoring.
Open

      cy.get('.ls-btn')
        .click()
        .should(function () {
          expect(localStorage.getItem('prop1')).to.eq('red')
          expect(localStorage.getItem('prop2')).to.eq('blue')
Severity: Major
Found in cypress/integration/example.spec.back.js and 1 other location - About 3 hrs to fix
cypress/integration/example.spec.back.js on lines 1155..1161

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 114.

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

Function registerValidSW has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function registerValidSW(swUrl, config) {
  navigator.serviceWorker
    .register(swUrl)
    .then((registration) => {
      registration.onupdatefound = () => {
Severity: Minor
Found in src/serviceWorker.js - About 1 hr to fix

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

      it('should display the next streams when scrolling at the bottom', () => {
        // Scroll to bottom
        cy.scrollTo('bottom', { easing: 'linear' })
    
        // Next games are displayed
    Severity: Major
    Found in cypress/integration/list-top-streams.spec.ts and 1 other location - About 1 hr to fix
    cypress/integration/list-famous-games.spec.ts on lines 11..17

    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 58.

    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 2 locations. Consider refactoring.
    Open

      it('should display the next games when scrolling at the bottom', () => {
        // Scroll to bottom
        cy.scrollTo('bottom', { easing: 'linear' })
    
        // Next games are displayed
    Severity: Major
    Found in cypress/integration/list-famous-games.spec.ts and 1 other location - About 1 hr to fix
    cypress/integration/list-top-streams.spec.ts on lines 11..17

    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 58.

    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 2 locations. Consider refactoring.
    Open

            this.setState((prevState) => ({
              cursor: response.pagination.cursor,
              streams: [
                ...prevState.streams,
                ...removeDuplicates(streams, response.data, 20),
    Severity: Major
    Found in src/scenes/StreamsProvider.tsx and 1 other location - About 1 hr to fix
    src/scenes/GamesProvider.tsx on lines 64..70

    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 55.

    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 2 locations. Consider refactoring.
    Open

            this.setState((prevState) => ({
              cursor: response.pagination.cursor,
              games: [
                ...prevState.games,
                ...removeDuplicates(games, response.data, 20),
    Severity: Major
    Found in src/scenes/GamesProvider.tsx and 1 other location - About 1 hr to fix
    src/scenes/StreamsProvider.tsx on lines 76..82

    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 55.

    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 2 locations. Consider refactoring.
    Open

        it('.parentsUntil() - get parent DOM elements from DOM elements until el', function () {
          // https://on.cypress.io/parentsuntil
          cy.get('.clothes-nav')
            .find('.active')
            .parentsUntil('.clothes-nav')
    Severity: Minor
    Found in cypress/integration/example.spec.back.js and 1 other location - About 50 mins to fix
    cypress/integration/example.spec.back.js on lines 127..133

    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 51.

    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 2 locations. Consider refactoring.
    Open

        it('.find() - get descendant DOM elements of the selector', function () {
          // https://on.cypress.io/find
          cy.get('.traversal-pagination')
            .find('li')
            .find('a')
    Severity: Minor
    Found in cypress/integration/example.spec.back.js and 1 other location - About 50 mins to fix
    cypress/integration/example.spec.back.js on lines 183..189

    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 51.

    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 2 locations. Consider refactoring.
    Open

        it('.next() - get next sibling DOM element', function () {
          // https://on.cypress.io/next
          cy.get('.traversal-ul')
            .contains('apples')
            .next()
    Severity: Minor
    Found in cypress/integration/example.spec.back.js and 1 other location - About 45 mins to fix
    cypress/integration/example.spec.back.js on lines 191..194

    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 50.

    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 2 locations. Consider refactoring.
    Open

        it('.nextAll() - get all next sibling DOM elements', function () {
          // https://on.cypress.io/nextall
          cy.get('.traversal-next-all')
            .contains('oranges')
            .nextAll()
    Severity: Minor
    Found in cypress/integration/example.spec.back.js and 1 other location - About 45 mins to fix
    cypress/integration/example.spec.back.js on lines 196..199

    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 50.

    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 2 locations. Consider refactoring.
    Open

        it('.prev() - get previous sibling DOM element', function () {
          // https://on.cypress.io/prev
          cy.get('.birds').find('.active').prev().should('contain', 'Lorikeets')
        })
    Severity: Minor
    Found in cypress/integration/example.spec.back.js and 1 other location - About 45 mins to fix
    cypress/integration/example.spec.back.js on lines 145..151

    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 50.

    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 2 locations. Consider refactoring.
    Open

        it('.prevAll() - get all previous sibling DOM elements', function () {
          // https://on.cypress.io/prevAll
          cy.get('.fruits-list').find('.third').prevAll().should('have.length', 2)
        })
    Severity: Minor
    Found in cypress/integration/example.spec.back.js and 1 other location - About 45 mins to fix
    cypress/integration/example.spec.back.js on lines 153..159

    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 50.

    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

    Parsing error: The keyword 'const' is reserved
    Open

    const isLocalhost = Boolean(
    Severity: Minor
    Found in src/serviceWorker.js by eslint

    For more information visit Source: http://eslint.org/docs/rules/

    Missing semicolon
    Open

    `
    Severity: Minor
    Found in src/constants/baseStyles.ts by tslint

    Rule: semicolon

    Enforces consistent semicolon usage at the end of every statement.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • "always" enforces semicolons at the end of every statement.
    • "never" disallows semicolons at the end of every statement except for when they are necessary.

    The following arguments may be optionally provided:

    • "ignore-interfaces" skips checking semicolons at the end of interface members.
    • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
    • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
    Examples
    "semicolon": true,always
    "semicolon": true,never
    "semicolon": true,always,ignore-interfaces
    "semicolon": true,always,ignore-bound-class-methods
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "always",
            "never"
          ]
        },
        {
          "type": "string",
          "enum": [
            "ignore-interfaces"
          ]
        }
      ],
      "additionalItems": false
    }

    For more information see this page.

    Missing semicolon
    Open

    export const APP_NAME = 'react-twitch-streamers'
    Severity: Minor
    Found in src/constants/twitchRoutes.ts by tslint

    Rule: semicolon

    Enforces consistent semicolon usage at the end of every statement.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • "always" enforces semicolons at the end of every statement.
    • "never" disallows semicolons at the end of every statement except for when they are necessary.

    The following arguments may be optionally provided:

    • "ignore-interfaces" skips checking semicolons at the end of interface members.
    • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
    • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
    Examples
    "semicolon": true,always
    "semicolon": true,never
    "semicolon": true,always,ignore-interfaces
    "semicolon": true,always,ignore-bound-class-methods
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "always",
            "never"
          ]
        },
        {
          "type": "string",
          "enum": [
            "ignore-interfaces"
          ]
        }
      ],
      "additionalItems": false
    }

    For more information see this page.

    Missing semicolon
    Open

    export const CLIENT_ID = 'a52wff1fy5itkosmjhruzmucgp99uc'
    Severity: Minor
    Found in src/constants/twitchRoutes.ts by tslint

    Rule: semicolon

    Enforces consistent semicolon usage at the end of every statement.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • "always" enforces semicolons at the end of every statement.
    • "never" disallows semicolons at the end of every statement except for when they are necessary.

    The following arguments may be optionally provided:

    • "ignore-interfaces" skips checking semicolons at the end of interface members.
    • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
    • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
    Examples
    "semicolon": true,always
    "semicolon": true,never
    "semicolon": true,always,ignore-interfaces
    "semicolon": true,always,ignore-bound-class-methods
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "always",
            "never"
          ]
        },
        {
          "type": "string",
          "enum": [
            "ignore-interfaces"
          ]
        }
      ],
      "additionalItems": false
    }

    For more information see this page.

    Missing semicolon
    Open

      name: string
    Severity: Minor
    Found in src/entities/game.ts by tslint

    Rule: semicolon

    Enforces consistent semicolon usage at the end of every statement.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • "always" enforces semicolons at the end of every statement.
    • "never" disallows semicolons at the end of every statement except for when they are necessary.

    The following arguments may be optionally provided:

    • "ignore-interfaces" skips checking semicolons at the end of interface members.
    • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
    • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
    Examples
    "semicolon": true,always
    "semicolon": true,never
    "semicolon": true,always,ignore-interfaces
    "semicolon": true,always,ignore-bound-class-methods
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "always",
            "never"
          ]
        },
        {
          "type": "string",
          "enum": [
            "ignore-interfaces"
          ]
        }
      ],
      "additionalItems": false
    }

    For more information see this page.

    Missing semicolon
    Open

    export const GRAY = '#454545'
    Severity: Minor
    Found in src/constants/colors.ts by tslint

    Rule: semicolon

    Enforces consistent semicolon usage at the end of every statement.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • "always" enforces semicolons at the end of every statement.
    • "never" disallows semicolons at the end of every statement except for when they are necessary.

    The following arguments may be optionally provided:

    • "ignore-interfaces" skips checking semicolons at the end of interface members.
    • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
    • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
    Examples
    "semicolon": true,always
    "semicolon": true,never
    "semicolon": true,always,ignore-interfaces
    "semicolon": true,always,ignore-bound-class-methods
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "always",
            "never"
          ]
        },
        {
          "type": "string",
          "enum": [
            "ignore-interfaces"
          ]
        }
      ],
      "additionalItems": false
    }

    For more information see this page.

    Missing semicolon
    Open

    export const GAME = '/game'
    Severity: Minor
    Found in src/constants/routes.ts by tslint

    Rule: semicolon

    Enforces consistent semicolon usage at the end of every statement.

    Notes
    • Has Fix

    Config

    One of the following arguments must be provided:

    • "always" enforces semicolons at the end of every statement.
    • "never" disallows semicolons at the end of every statement except for when they are necessary.

    The following arguments may be optionally provided:

    • "ignore-interfaces" skips checking semicolons at the end of interface members.
    • "ignore-bound-class-methods" skips checking semicolons at the end of bound class methods.
    • "strict-bound-class-methods" disables any special handling of bound class methods and treats them as any other assignment. This option overrides "ignore-bound-class-methods".
    Examples
    "semicolon": true,always
    "semicolon": true,never
    "semicolon": true,always,ignore-interfaces
    "semicolon": true,always,ignore-bound-class-methods
    Schema
    {
      "type": "array",
      "items": [
        {
          "type": "string",
          "enum": [
            "always",
            "never"
          ]
        },
        {
          "type": "string",
          "enum": [
            "ignore-interfaces"
          ]
        }
      ],
      "additionalItems": false
    }

    For more information see this page.

    Severity
    Category
    Status
    Source
    Language