ayushagg31 / Trellis

A simplified Trello clone built with React, Redux, Node, Express and MongoDB.
https://trellis-app.herokuapp.com
GNU General Public License v3.0
126 stars 54 forks source link

Fix linting errors #54

Closed jacubsmith closed 3 years ago

jacubsmith commented 3 years ago

Describe the bug Based on adding the linting fix to the PR workflow there is a number of sytnax errors that need to be fixed for the tests to pass successfully. These linting issues are mainly stylistic but cannot be fixed automatically.

To Reproduce Steps to reproduce the behavior:

  1. From root direction run npm run lint:all.
  2. Fix all errors until tests pass.

Expected behavior Linter should run without reporting any errors.

Additional context

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Activities.js
  41:9  error  Unexpected var, use let or const instead  no-var

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Auth.js
   93:13  error  A form label must be associated with a control  jsx-a11y/label-has-associated-control
  102:13  error  A form label must be associated with a control  jsx-a11y/label-has-associated-control
  112:17  error  A form label must be associated with a control  jsx-a11y/label-has-associated-control

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Background.js
   71:9   error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
   71:9   error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions
   83:9   error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
   83:9   error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions
   99:13  error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
   99:13  error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions
  111:13  error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
  111:13  error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions
  113:20  error  Do not use Array index in keys                                                                  react/no-array-index-key

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Board.js
   63:3   error  Unexpected var, use let or const instead     no-var
  109:27  error  'id' is already declared in the upper scope  no-shadow
  135:5   error  Unexpected var, use let or const instead     no-var

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/BoardHeader.js
  34:7  error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
  34:7  error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Boards.js
  149:17  error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
  149:17  error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions
  168:15  error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
  168:15  error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Card.js
  83:21  error  Assignment to property of function parameter 'task'  no-param-reassign

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Footer.js
  4:31  error  'theme' is defined but never used  no-unused-vars

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/List.js
  131:5   error  Assignment to property of function parameter 'column'                                           no-param-reassign
  148:17  error  Visible, non-interactive elements with click handlers must have at least one keyboard listener  jsx-a11y/click-events-have-key-events
  148:17  error  Static HTML elements with event handlers require a role                                         jsx-a11y/no-static-element-interactions
  205:21  error  'provided' is already declared in the upper scope                                               no-shadow
  208:43  error  'index' is already declared in the upper scope                                                  no-shadow

/Users/jakesmith/Projects/open-source/Trellis/client/src/components/Notice.js
  34:7  error  Missing an explicit type attribute for button  react/button-has-type

/Users/jakesmith/Projects/open-source/Trellis/client/src/ordering/ordering.js
   2:3   error  Unexpected var, use let or const instead          no-var
   3:3   error  Unexpected var, use let or const instead          no-var
   4:3   error  Unexpected var, use let or const instead          no-var
   6:26  error  Unary operator '++' used                          no-plusplus
  16:47  error  Unary operator '++' used                          no-plusplus
  28:13  error  Unexpected assignment within a 'while' statement  no-cond-assign
  28:53  error  Unary operator '++' used                          no-plusplus

/Users/jakesmith/Projects/open-source/Trellis/client/src/reducers/activityReducer.js
  16:7  error  Unexpected lexical declaration in case block  no-case-declarations
  17:7  error  Unexpected lexical declaration in case block  no-case-declarations

/Users/jakesmith/Projects/open-source/Trellis/client/src/reducers/boardReducer.js
  42:7  error  Unexpected lexical declaration in case block  no-case-declarations
  43:7  error  Unexpected lexical declaration in case block  no-case-declarations
  55:7  error  Unexpected lexical declaration in case block  no-case-declarations
  56:7  error  Unexpected lexical declaration in case block  no-case-declarations

/Users/jakesmith/Projects/open-source/Trellis/client/src/reducers/cardsReducer.js
  16:7  error  Unexpected lexical declaration in case block  no-case-declarations
  17:7  error  Unexpected lexical declaration in case block  no-case-declarations
  23:7  error  Unexpected lexical declaration in case block  no-case-declarations
  24:7  error  Unexpected lexical declaration in case block  no-case-declarations

/Users/jakesmith/Projects/open-source/Trellis/client/src/reducers/imageReducer.js
  9:7  error  Unexpected lexical declaration in case block  no-case-declarations

/Users/jakesmith/Projects/open-source/Trellis/client/src/reducers/listsReducer.js
  16:7  error  Unexpected lexical declaration in case block  no-case-declarations
  17:7  error  Unexpected lexical declaration in case block  no-case-declarations
  23:7  error  Unexpected lexical declaration in case block  no-case-declarations
  24:7  error  Unexpected lexical declaration in case block  no-case-declarations

/Users/jakesmith/Projects/open-source/Trellis/client/src/routers/AppRouter.js
  27:9  error  'token' is already declared in the upper scope  no-shadow

/Users/jakesmith/Projects/open-source/Trellis/client/src/store/configureStore.js
  22:5  error  Assignment to function parameter 'state'  no-param-reassign
ayushagg31 commented 3 years ago

sure, I'll modify the code or add eslint -ignore in code to avoid these warnings.

jacubsmith commented 3 years ago

Cool, I thought it would be best as you are in control of code quality - if you need a hand please let me know and i'll be happy to help out.

ayushagg31 commented 3 years ago

sure, will let you know. Thanks

ayushagg31 commented 3 years ago

All linter issues have been resolved and updated the master, closing this issue for now.