glittershark/reactable

View on GitHub

Showing 183 of 183 total issues

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

            it('specifies a class on the currently active page', function() {
                var activePage = $('#table tbody.reactable-pagination a.reactable-page-button.reactable-current-page');
                expect(activePage.length).to.equal(1);
                expect(activePage).to.have.text('1');
            });
Severity: Major
Found in tests/reactable_test.jsx and 1 other location - About 1 hr to fix
tests/reactable_test.jsx on lines 989..993

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

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('puts an active class on the new active page', function() {
                    var activePage = $('#table tbody.reactable-pagination a.reactable-page-button.reactable-current-page');
                    expect(activePage.length).to.equal(1);
                    expect(activePage).to.have.text('2');
                });
Severity: Major
Found in tests/reactable_test.jsx and 1 other location - About 1 hr to fix
tests/reactable_test.jsx on lines 958..962

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

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 render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                    render: function() {
                      return (
                        <div>
                          <input type="text" ref="customFilterInput" id="customFilterInput" value={this.state.customFilterText} onChange={this.handleChange}/>
                          <Reactable.Table className="table" id="table"
Severity: Minor
Found in tests/reactable_test.jsx - About 1 hr to fix

    Function value has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

            value: function(predicate) {
                if (this === null) {
                    throw new TypeError('Array.prototype.find called on null or undefined');
                }
                if (typeof predicate !== 'function') {
    Severity: Minor
    Found in src/reactable.jsx - About 1 hr 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 initializeSorts has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        initializeSorts(props) {
            this._sortable = {};
            // Transform sortable properties into a more friendly list
            for (let i in props.sortable) {
                let column = props.sortable[i];
    Severity: Minor
    Found in src/reactable/table.jsx - About 1 hr 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 initializeFilters has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

        initializeFilters(props) {
            this._filterable = {};
            // Transform filterable properties into a more friendly list
            for (let i in props.filterable) {
                let column = props.filterable[i];
    Severity: Minor
    Found in src/reactable/table.jsx - About 1 hr 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 render has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                        render: function() {
                          return (
                            <div>
                              <input type="text" ref="customFilterInput" id="customFilterInput" value={this.state.customFilterText} onChange={this.handleChange}/>
                              <Reactable.Table className="table" id="table"
    Severity: Minor
    Found in tests/reactable_test.jsx - About 1 hr to fix

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

              it('renders the regular data rows', function() {
                  ReactableTestUtils.expectRowText(0, ['Griffin Smith', '18', '']);
                  ReactableTestUtils.expectRowText(1, ['Lee Salminen', '23', '']);
                  ReactableTestUtils.expectRowText(2, ['', '28', 'Developer']);
              });
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 1214..1218
      tests/reactable_test.jsx on lines 1435..1439
      tests/reactable_test.jsx on lines 1528..1532
      tests/reactable_test.jsx on lines 1576..1580
      tests/reactable_test.jsx on lines 2332..2336

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

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

                  it('renders all rows sorted by default column age descending', function(){
                      ReactableTestUtils.expectRowText(0, ['Ian Zhang', '28', 'Developer']);
                      ReactableTestUtils.expectRowText(1, ['Lee Salminen', '23', 'Programmer']);
                      ReactableTestUtils.expectRowText(2, ['Griffin Smith', '18', 'Engineer']);
                  });
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 422..426
      tests/reactable_test.jsx on lines 1214..1218
      tests/reactable_test.jsx on lines 1528..1532
      tests/reactable_test.jsx on lines 1576..1580
      tests/reactable_test.jsx on lines 2332..2336

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

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

                      it('applies the filtering', function() {
                          ReactableTestUtils.expectRowText(0, ['New Mexico', 'lorem ipsum', 'old x']);
                          ReactableTestUtils.expectRowText(1, ['Colorado', 'lol', 'renewed x']);
                          ReactableTestUtils.expectRowText(2, ['Alaska', 'bacon', 'new']);
                      });
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 422..426
      tests/reactable_test.jsx on lines 1214..1218
      tests/reactable_test.jsx on lines 1435..1439
      tests/reactable_test.jsx on lines 1528..1532
      tests/reactable_test.jsx on lines 1576..1580

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

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

                  it('renders all rows with no sort', function(){
                      ReactableTestUtils.expectRowText(0, ['Lee Salminen', '23', 'Programmer']);
                      ReactableTestUtils.expectRowText(1, ['Griffin Smith', '18', 'Engineer']);
                      ReactableTestUtils.expectRowText(2, ['Ian Zhang', '28', 'Developer']);
                  });
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 422..426
      tests/reactable_test.jsx on lines 1435..1439
      tests/reactable_test.jsx on lines 1528..1532
      tests/reactable_test.jsx on lines 1576..1580
      tests/reactable_test.jsx on lines 2332..2336

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

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

                  it('renders all rows sorted by default column age ascending', function(){
                      ReactableTestUtils.expectRowText(0, ['Griffin Smith', '18', 'Engineer']);
                      ReactableTestUtils.expectRowText(1, ['Lee Salminen', '23', 'Programmer']);
                      ReactableTestUtils.expectRowText(2, ['Ian Zhang', '28', 'Developer']);
                  });
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 422..426
      tests/reactable_test.jsx on lines 1214..1218
      tests/reactable_test.jsx on lines 1435..1439
      tests/reactable_test.jsx on lines 1528..1532
      tests/reactable_test.jsx on lines 2332..2336

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

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

                  it('renders all rows sorted by default column age descending', function(){
                      ReactableTestUtils.expectRowText(0, ['Ian Zhang', '28', 'Developer']);
                      ReactableTestUtils.expectRowText(1, ['Lee Salminen', '23', 'Programmer']);
                      ReactableTestUtils.expectRowText(2, ['Griffin Smith', '18', 'Engineer']);
                  });
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 422..426
      tests/reactable_test.jsx on lines 1214..1218
      tests/reactable_test.jsx on lines 1435..1439
      tests/reactable_test.jsx on lines 1576..1580
      tests/reactable_test.jsx on lines 2332..2336

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

      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 render has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          render() {
              // Attach any properties on the column to this Td object to allow things like custom event handlers
              var mergedProps = filterPropsFrom(this.props);
              if (typeof(this.props.column) === 'object') {
                  for (var key in this.props.column) {
      Severity: Minor
      Found in src/reactable/td.jsx - About 1 hr 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 render has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
      Open

          render() {
              if (typeof this.props.colSpan === 'undefined') {
                  throw new TypeError('Must pass a colSpan argument to Paginator');
              }
      
      
      Severity: Minor
      Found in src/reactable/paginator.jsx - About 1 hr 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

                       onPageChange={page => {
                           this.setState({ currentPage: page });
                           if (this.props.onPageChange) {
                              this.props.onPageChange(page)
                           }
      Severity: Major
      Found in src/reactable/table.jsx and 1 other location - About 1 hr to fix
      src/reactable/table.jsx on lines 488..493

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

      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

                             onFilter={filter => {
                           this.setState({ filter: filter });
                           if (this.props.onFilter) {
                              this.props.onFilter(filter)
                           }
      Severity: Major
      Found in src/reactable/table.jsx and 1 other location - About 1 hr to fix
      src/reactable/table.jsx on lines 513..518

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

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

                          <Reactable.Table className="table" id="table" data={[
                              { Name: 'Lee Salminen', Age: '23', Position: 'Programmer'},
                              { Name: 'Griffin Smith', Age: '18', Position: 'Engineer'},
                              { Name: 'Ian Zhang', Age: '28', Position: 'Developer'}
                          ]}
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 1189..1193
      tests/reactable_test.jsx on lines 1309..1313
      tests/reactable_test.jsx on lines 1501..1505
      tests/reactable_test.jsx on lines 1550..1554
      tests/reactable_test.jsx on lines 1586..1590

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

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

                              <Reactable.Table className="table" id="table" data={[
                                  { Name: 'Lee Salminen', Age: '23', Position: 'Programmer'},
                                  { Name: 'Griffin Smith', Age: '18', Position: 'Engineer'},
                                  { Name: 'Ian Zhang', Age: '28', Position: 'Developer'}
                              ]}
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 1189..1193
      tests/reactable_test.jsx on lines 1409..1413
      tests/reactable_test.jsx on lines 1501..1505
      tests/reactable_test.jsx on lines 1550..1554
      tests/reactable_test.jsx on lines 1586..1590

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

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

                          <Reactable.Table className="table" id="table" data={[
                              { Name: 'Lee Salminen', Age: '23', Position: 'Programmer'},
                              { Name: 'Griffin Smith', Age: '18', Position: 'Engineer'},
                              { Name: 'Ian Zhang', Age: '28', Position: 'Developer'}
                          ]}
      Severity: Major
      Found in tests/reactable_test.jsx and 5 other locations - About 1 hr to fix
      tests/reactable_test.jsx on lines 1189..1193
      tests/reactable_test.jsx on lines 1309..1313
      tests/reactable_test.jsx on lines 1409..1413
      tests/reactable_test.jsx on lines 1501..1505
      tests/reactable_test.jsx on lines 1586..1590

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

      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

      Severity
      Category
      Status
      Source
      Language