lnked/react-starter

View on GitHub

Showing 115 of 115 total issues

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

export default function Button ({ type, size = 'small', circle, label, loading, children, handleClick, ...rest }: P) {
  return (
    <Container>
      <StyledButton
        type={type}
Severity: Minor
Found in src/components/button/input.styled.tsx and 1 other location - About 50 mins to fix
src/components/button/index.tsx on lines 27..55

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

      {
        context: 'assets/images',
        from: { glob: '**/*', dot: true },
        to: resolve(define.rs_dist, 'img'),
        force: true,
Severity: Minor
Found in webpack/plugins/general.js and 1 other location - About 35 mins to fix
webpack/plugins/general.js on lines 144..150

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

      {
        context: 'assets/fonts/SF',
        from: { glob: '**/*', dot: true },
        to: resolve(define.rs_dist, 'assets/fonts/SF'),
        force: true,
Severity: Minor
Found in webpack/plugins/general.js and 1 other location - About 35 mins to fix
webpack/plugins/general.js on lines 137..143

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

Function getTemplate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

module.exports.getTemplate = (type = 'class', name) => {
  const template = []

  if (type === 'route') {
    template.push(
Severity: Minor
Found in webpack/utils/helpers.js - About 35 mins to fix

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

Definition for rule 'optimize-regex/optimize-regex' was not found
Open

test('App works', () => {})
Severity: Minor
Found in src/__tests__/app.test.js by eslint

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

Definition for rule 'compat/compat' was not found
Open

test('test', () => {})
Severity: Minor
Found in src/__tests__/ezyme.test.js by eslint

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

Definition for rule 'no-loops/no-loops' was not found
Open

test('test', () => { })
Severity: Minor
Found in src/__tests__/snap.test.js by eslint

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

Definition for rule 'optimize-regex/optimize-regex' was not found
Open

// import * as React from 'react'
Severity: Minor
Found in src/components/button/index.test.js by eslint

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

Definition for rule 'no-loops/no-loops' was not found
Open

module.exports = {
Severity: Minor
Found in prettier.config.js by eslint

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

Definition for rule 'no-loops/no-loops' was not found
Open

// Jest configuration
Severity: Minor
Found in jest.config.js by eslint

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

Definition for rule 'compat/compat' was not found
Open

test('test', () => { })
Severity: Minor
Found in src/__tests__/enzyme.test.js by eslint

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

Definition for rule 'sonarjs/cognitive-complexity' was not found
Open

// import {
Severity: Minor
Found in src/__tests__/predicts.test.js by eslint

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

Definition for rule 'optimize-regex/optimize-regex' was not found
Open

test('test', () => {})
Severity: Minor
Found in src/__tests__/sinon.test.js by eslint

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

Definition for rule 'sonarjs/cognitive-complexity' was not found
Open

// import React from 'react'
Severity: Minor
Found in src/__tests__/snapshot.test.js by eslint

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

Definition for rule 'sonarjs/cognitive-complexity' was not found
Open

// import * as React from 'react'
Severity: Minor
Found in src/components/button/index.test.js by eslint

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

Definition for rule 'no-use-extend-native/no-use-extend-native' was not found
Open

module.exports = (wallaby) => {
Severity: Minor
Found in wallaby.conf.js by eslint

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

Definition for rule 'sonarjs/cognitive-complexity' was not found
Open

module.exports = {
Severity: Minor
Found in prettier.config.js by eslint

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

Definition for rule 'optimize-regex/optimize-regex' was not found
Open

test('test', () => {})
Severity: Minor
Found in src/__tests__/ezyme.test.js by eslint

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

Definition for rule 'no-loops/no-loops' was not found
Open

test('test', () => {})
Severity: Minor
Found in src/__tests__/reducer.test.js by eslint

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

Definition for rule 'compat/compat' was not found
Open

test('test', () => { })
Severity: Minor
Found in src/__tests__/snap.test.js by eslint

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

Severity
Category
Status
Source
Language