CLOSER-Cohorts/archivist

View on GitHub
react/src/pages/DatasetView.js

Summary

Maintainability
F
1 wk
Test Coverage

Function DatasetView has 453 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const DatasetView = (props) => {

  const dispatch = useDispatch()
  const datasetId = get(props, "match.params.dataset_id", "")

Severity: Major
Found in react/src/pages/DatasetView.js - About 2 days to fix

File DatasetView.js has 537 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { useEffect, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux'
import { Dataset, DatasetVariable, Topics } from '../actions'
import { Dashboard } from '../components/Dashboard'
import { DatasetHeading } from '../components/DatasetHeading'
Severity: Major
Found in react/src/pages/DatasetView.js - About 1 day to fix

Function DatasetView has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring.
Open

const DatasetView = (props) => {

  const dispatch = useDispatch()
  const datasetId = get(props, "match.params.dataset_id", "")

Severity: Minor
Found in react/src/pages/DatasetView.js - About 7 hrs 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

Function SourcesList has 91 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const SourcesList = (props) => {
    const { sources, datasetId, variable } = props

    let { sourceOptions } = props

Severity: Major
Found in react/src/pages/DatasetView.js - About 3 hrs to fix

Function VariableSourcesList has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const VariableSourcesList = (props) => {
    const { sources, datasetId, variable } = props

    let { sourceOptions } = props

Severity: Major
Found in react/src/pages/DatasetView.js - About 3 hrs to fix

Consider simplifying this complex logical expression.
Open

    if (get(variable.topic, 'id') !== 0 && (!isEmpty(variable.topic) || !isEmpty(variable.sources_topic)) ){
      sourceOptions = sourceOptions.filter(opt => {
        return (
          get(opt.topic, 'id') == get(variable.topic, 'id') ||
          get(opt, 'topic') == get(variable.topic, 'name') ||
Severity: Critical
Found in react/src/pages/DatasetView.js - About 2 hrs to fix

Function TopicList has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const TopicList = (props) => {
  const {topicId, datasetId, variableId} = props

  const dispatch = useDispatch()

Severity: Minor
Found in react/src/pages/DatasetView.js - About 1 hr to fix

Consider simplifying this complex logical expression.
Open

    if (get(variable.topic, 'id') !== 0 && (!isEmpty(variable.topic) || !isEmpty(variable.sources_topic))) {
      sourceOptions = Object.values(sourceOptions).filter(opt => {
        return (
          get(opt.topic, 'id') == get(variable.topic, 'id') ||
          get(opt.resolved_topic, 'id') == get(variable.topic, 'id') ||
Severity: Critical
Found in react/src/pages/DatasetView.js - About 1 hr to fix

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

  const VariableTableRow = (props) => {
    const { row } = props;

    const status = ObjectStatus(row.id, 'DatasetVariable')

Severity: Minor
Found in react/src/pages/DatasetView.js - About 1 hr to fix

Function ReadOnlyVariableTableRow has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const ReadOnlyVariableTableRow = (props) => {
    const { row } = props;

    const status = ObjectStatus(row.id, 'DatasetVariable')

Severity: Minor
Found in react/src/pages/DatasetView.js - About 1 hr to fix

Function TopicList has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

const TopicList = (props) => {
  const {topicId, datasetId, variableId} = props

  const dispatch = useDispatch()

Severity: Minor
Found in react/src/pages/DatasetView.js - About 25 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

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

            <Grid container spacing={3}>
              <Grid item xs={4}>
                  <Box fontWeight="fontWeightLight" m={2} >
                    <Card>
                      <CardContent>
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 2 days to fix
react/src/pages/InstrumentMap.js on lines 724..767

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

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

    const handleChange = (event, value, reason) => {
      switch (reason) {
        case 'select-option':
          difference = value.filter(x => !sources.includes(x));
          if (!isEmpty(difference)) {
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 6 hrs to fix
react/src/pages/DatasetView.js on lines 388..405

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

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

    const handleChange = (event, value, reason) => {
      switch (reason) {
        case 'select-option':
          difference = value.filter(x => !sources.includes(x));
          if(!isEmpty(difference)){
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 6 hrs to fix
react/src/pages/DatasetView.js on lines 286..303

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

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

  } else if (isNil(topicId)) {
    return (
      <div>
        <Autocomplete
          onChange={handleChange}
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 5 hrs to fix
react/src/pages/InstrumentMap.js on lines 321..349

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

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

             <TableFooter>
                <TableRow>
                  <TablePagination
                    rowsPerPageOptions={[20, 50, 100, { label: 'All', value: -1 }]}
                    colSpan={3}
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 4 hrs to fix
react/src/pages/AdminImports.js on lines 73..89

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

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

    if(isEmpty(sources)){
      return (
        <div>
           <Autocomplete
            multiple
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 4 hrs to fix
react/src/pages/DatasetView.js on lines 305..353

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

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

    if (isEmpty(sources)) {
      return (
        <div>
          <Autocomplete
            multiple
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 4 hrs to fix
react/src/pages/DatasetView.js on lines 407..455

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

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

        <Autocomplete
          onChange={handleChange}
          options={topicOptions}
          renderInput={params => (
            <TextField {...params} label="Topic" variant="outlined" />
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 2 hrs to fix
react/src/pages/InstrumentMap.js on lines 325..332

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

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

  const classes = makeStyles((theme) => ({
    root: {
      flexGrow: 1,
    },
    paper: {
Severity: Major
Found in react/src/pages/DatasetView.js and 1 other location - About 1 hr to fix
react/src/pages/InstrumentMap.js on lines 308..317

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

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

  const topicOptions = [{ id: null, name: '', level: 1 }].concat(Object.values(get(topics, 'flattened', {})));
Severity: Minor
Found in react/src/pages/DatasetView.js and 1 other location - About 40 mins to fix
react/src/pages/InstrumentMap.js on lines 307..307

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

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

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

    const handleRemoveSource = (oldSources) => {
      oldSources.map((source) => {
        dispatch(DatasetVariable.remove_source(datasetId, variableId, source));
      })
    }
Severity: Minor
Found in react/src/pages/DatasetView.js and 1 other location - About 35 mins to fix
react/src/pages/DatasetView.js on lines 380..384

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

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

    const handleRemoveSource = (oldSources) => {
      oldSources.map((source)=>{
        dispatch(DatasetVariable.remove_source(datasetId, variableId, source));
      })
    }
Severity: Minor
Found in react/src/pages/DatasetView.js and 1 other location - About 35 mins to fix
react/src/pages/DatasetView.js on lines 278..282

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

    if (status.error) {
      errorMessage = status.errorMessage
    } else if (row.errors) {
      errorMessage = row.errors
    }
Severity: Major
Found in react/src/pages/DatasetView.js and 4 other locations - About 30 mins to fix
react/src/pages/DatasetView.js on lines 155..159
react/src/pages/DatasetView.js on lines 541..545
react/src/pages/InstrumentMap.js on lines 174..178
react/src/pages/InstrumentMap.js on lines 232..236

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

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

    if (status.error) {
      errorMessage = status.errorMessage
    } else if (row.errors) {
      errorMessage = row.errors
    }
Severity: Major
Found in react/src/pages/DatasetView.js and 4 other locations - About 30 mins to fix
react/src/pages/DatasetView.js on lines 194..198
react/src/pages/DatasetView.js on lines 541..545
react/src/pages/InstrumentMap.js on lines 174..178
react/src/pages/InstrumentMap.js on lines 232..236

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

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

                  if(status.error){
                    errorMessage = status.errorMessage
                  }else if(row.errors){
                    errorMessage = row.errors
                  }
Severity: Major
Found in react/src/pages/DatasetView.js and 4 other locations - About 30 mins to fix
react/src/pages/DatasetView.js on lines 155..159
react/src/pages/DatasetView.js on lines 194..198
react/src/pages/InstrumentMap.js on lines 174..178
react/src/pages/InstrumentMap.js on lines 232..236

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

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: 'import' and 'export' may appear only with 'sourceType: module'
Open

import React, { useEffect, useState } from 'react';
Severity: Minor
Found in react/src/pages/DatasetView.js by eslint

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

There are no issues that match your filters.

Category
Status