Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all linter warnings #478

Closed
adeebshihadeh opened this issue May 29, 2024 · 0 comments · Fixed by #480
Closed

Fix all linter warnings #478

adeebshihadeh opened this issue May 29, 2024 · 0 comments · Fixed by #480

Comments

@adeebshihadeh
Copy link
Contributor

Run with pnpm lint

batman:connect$ pnpm lint

> connect@0.8.0 lint /home/batman/two/connect
> eslint --ext .js,.jsx,.ts,.tsx src

Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .

/home/batman/two/connect/src/App.jsx
   45:3  warning  Expected 'this' to be used by class method 'apiErrorResponseCallback'  class-methods-use-this
   80:3  warning  Expected 'this' to be used by class method 'redirectLink'              class-methods-use-this
  100:3  warning  Expected 'this' to be used by class method 'anonymousRoutes'           class-methods-use-this
  111:3  warning  Expected 'this' to be used by class method 'renderLoading'             class-methods-use-this

/home/batman/two/connect/src/actions/cached.js
   85:22  warning  'expireCacheItems' was used before it was defined  no-use-before-define
  347:14  warning  'fetchCoord' was used before it was defined        no-use-before-define
  348:14  warning  'fetchCoord' was used before it was defined        no-use-before-define

/home/batman/two/connect/src/actions/files.js
  271:22  warning  Unexpected `await` inside a loop  no-await-in-loop

/home/batman/two/connect/src/actions/index.js
   15:12  warning  'checkRoutesData' was used before it was defined         no-use-before-define
   24:25  warning  'urlForState' was used before it was defined             no-use-before-define
   78:16  warning  'primeFetchSubscription' was used before it was defined  no-use-before-define
   79:16  warning  'fetchDeviceOnline' was used before it was defined       no-use-before-define
   82:14  warning  'checkRoutesData' was used before it was defined         no-use-before-define
   85:27  warning  'urlForState' was used before it was defined             no-use-before-define
  107:20  warning  'primeGetSubscription' was used before it was defined    no-use-before-define
  144:27  warning  'urlForState' was used before it was defined             no-use-before-define

/home/batman/two/connect/src/analytics.js
  104:3  warning  Expected a default case  default-case

/home/batman/two/connect/src/components/AppHeader/TimeFilter.jsx
   80:5  warning  Expected a default case                                      default-case
  157:3  warning  Expected 'this' to be used by class method 'lastWeekText'    class-methods-use-this
  162:3  warning  Expected 'this' to be used by class method 'last2WeeksText'  class-methods-use-this

/home/batman/two/connect/src/components/Dashboard/DeviceSettingsModal.jsx
  172:3  warning  Expected 'this' to be used by class method 'callOnEnter'  class-methods-use-this

/home/batman/two/connect/src/components/DeviceInfo/index.jsx
  322:19  warning  Empty block statement  no-empty

/home/batman/two/connect/src/components/DriveMap/index.jsx
  152:3  warning  Expected 'this' to be used by class method 'onRef'  class-methods-use-this

/home/batman/two/connect/src/components/DriveView/Media.jsx
  323:3   warning  Expected 'this' to be used by class async method 'shareCurrentRoute'  class-methods-use-this
  660:17  warning  Do not nest ternary expressions                                       no-nested-ternary
  685:17  warning  Do not nest ternary expressions                                       no-nested-ternary
  811:13  warning  Do not nest ternary expressions                                       no-nested-ternary

/home/batman/two/connect/src/components/Files/UploadQueue.jsx
  193:34  warning  Do not nest ternary expressions  no-nested-ternary
  214:17  warning  Do not nest ternary expressions  no-nested-ternary
  282:19  warning  Do not nest ternary expressions  no-nested-ternary

/home/batman/two/connect/src/components/IosPwaPopup/index.jsx
  107:19  warning  Empty block statement  no-empty

/home/batman/two/connect/src/components/Navigation/index.jsx
   506:3   warning  Expected 'this' to be used by class method 'getFavoriteLabelIcon'  class-methods-use-this
   777:3   warning  Expected 'this' to be used by class method 'itemLoc'               class-methods-use-this
   937:3   warning  Expected 'this' to be used by class method 'carLocationCircle'     class-methods-use-this
  1330:21  warning  Do not nest ternary expressions                                    no-nested-ternary

/home/batman/two/connect/src/components/Prime/PrimeCheckout.jsx
  444:15  warning  Do not nest ternary expressions  no-nested-ternary

/home/batman/two/connect/src/components/VisibilityHandler/index.jsx
  83:3  warning  Expected 'this' to be used by class method 'render'  class-methods-use-this

/home/batman/two/connect/src/components/anonymous.jsx
  105:3  warning  Expected 'this' to be used by class method 'componentDidMount'  class-methods-use-this

/home/batman/two/connect/src/components/explorer.jsx
  182:26  warning  Do not nest ternary expressions  no-nested-ternary
  219:13  warning  Do not nest ternary expressions  no-nested-ternary

/home/batman/two/connect/src/reducers/globalState.js
   29:7  warning  Unexpected lexical declaration in case block  no-case-declarations
  139:7  warning  Unexpected lexical declaration in case block  no-case-declarations
  140:7  warning  Unexpected lexical declaration in case block  no-case-declarations

✖ 43 problems (0 errors, 43 warnings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant