thanos icon indicating copy to clipboard operation
thanos copied to clipboard

UI: Warnings when building react app

Open jacobbaungard opened this issue 1 year ago • 4 comments

Currently there are quite a few warnings when compiling the react-app as seen below.

These should ideally be fixed, afterwards we can remove CI=false from our build step to ensure any new code introduced doesn't generate new warnings.

List of warnings:

 src/components/ListTree.tsx
  Line 30:50:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 30:61:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/components/withStatusIndicator.tsx
  Line 41:36:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/hooks/useFetch.ts
  Line 12:92:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/pages/alerts/AlertContents.tsx
  Line 11:42:   Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 163:38:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/pages/config/Config.tsx
  Line 30:17:  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
src/pages/graph/CMTheme.tsx
  Line 15:7:  Identifier 'outline_fallback' is not in camel case  camelcase
src/pages/graph/GraphControls.tsx
  Line 66:5:    Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
  Line 94:7:    Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
  Line 115:51:  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
  Line 139:34:  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
src/pages/graph/GraphHelpers.ts
  Line 140:46:  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
src/pages/graph/GraphTabContent.tsx
  Line 8:9:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/pages/graph/Panel.tsx
  Line 54:9:    Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
  Line 208:7:   Identifier 'partial_response' is not in camel case  camelcase
  Line 308:20:  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
  Line 370:45:  Unexpected any. Specify a different type            @typescript-eslint/no-explicit-any
  Line 417:7:   Identifier 'partial_response' is not in camel case  camelcase
src/pages/graph/SeriesName.tsx
  Line 32:47:  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
  Line 49:32:  Forbidden non-null assertion  @typescript-eslint/no-non-null-assertion
src/pages/graph/TimeInput.tsx
  Line 36:18:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 63:20:  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
  Line 81:48:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/pages/status/Status.tsx
  Line 15:42:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 15:63:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 62:55:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/pages/targets/Targets.tsx
  Line 3:8:   'Filter' is defined but never used           @typescript-eslint/no-unused-vars
  Line 6:10:  'useLocalStorage' is defined but never used  @typescript-eslint/no-unused-vars
src/thanos/pages/blocks/helpers.ts
  Line 155:45:  Array.prototype.map() expects a return value from arrow function  array-callback-return
src/thanos/pages/errorBoundary/ErrorBoundary.tsx
  Line 10:45:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 11:22:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
src/utils/index.ts
  Line 299:28:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  Line 300:13:  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

jacobbaungard avatar Jan 16 '24 11:01 jacobbaungard

I would like to work on it . Started doing so .

AbhiRam162105 avatar Feb 12 '24 08:02 AbhiRam162105

Hello @jacobbaungard, I would like to work on this issue if it is not still fixed.

0ZeKa0 avatar May 25 '24 18:05 0ZeKa0

Hi @0ZeKa0 are you still working on this issue? we can collaborate if you're interested.

bdharsan04 avatar Jul 05 '24 20:07 bdharsan04

How to test if my changes are not breaking other part of the code? Should I run these commands -

make check-react-app
make react-app-test

Or Anything else?

NishantBansal2003 avatar Jul 23 '24 14:07 NishantBansal2003