Drapegnik/react-grid

View on GitHub

Showing 6 of 6 total issues

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

const tableData = {
columns: [{ name: 'first' }, { name: 'second' }, { name: 'third' }],
data: [
{
id: 101,
Severity: Major
Found in src/components/Table/Table.test.jsx and 1 other location - About 3 hrs to fix
src/stories/index.jsx on lines 22..42

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

const tableWithData = {
columns: [{ name: 'first' }, { name: 'second' }, { name: 'third' }],
data: [
{
id: 101,
Severity: Major
Found in src/stories/index.jsx and 1 other location - About 3 hrs to fix
src/components/Table/Table.test.jsx on lines 36..58

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

it('Should be rendered with 4 columns and 3 rows', () => {
expect(wrapper.find('table').length).toEqual(1);
expect(wrapper.find('tbody tr').length).toEqual(3);
expect(wrapper.find('thead tr th').length).toEqual(4);
});
Severity: Major
Found in src/components/Table/Table.test.jsx and 1 other location - About 2 hrs to fix
src/components/Table/Table.test.jsx on lines 13..17

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

it('Should be rendered an empty without columns and data', () => {
expect(wrapper.find('table').length).toEqual(1);
expect(wrapper.find('tbody tr').length).toEqual(0);
expect(wrapper.find('thead tr th').length).toEqual(0);
});
Severity: Major
Found in src/components/Table/Table.test.jsx and 1 other location - About 2 hrs to fix
src/components/Table/Table.test.jsx on lines 66..70

Function App has 32 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function App() {
const columns = [
{ name: 'tool' },
{ name: 'initiator', formatter: o => `${o.id}-${o.name}` },
{ name: 'result' },
Severity: Minor
Found in src/App.jsx - About 1 hr to fix

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

    render() {
    return (
    <div className="main" >
    <h1>Welcome to STORYBOOK</h1>
    <p>This is a UI component dev environment for your app.</p>
    Severity: Minor
    Found in src/stories/Welcome.jsx - About 1 hr to fix
      Severity
      Category
      Status
      Source
      Language