Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Eslint issues

Aperta
#35 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
eslint, typescript
Ambito
frontend, tooling

Direzione di ricerca

Inizia nella directory frontend eseguendo npm run lint e usa i percorsi e le regole segnalati come elenco di attività, inclusi App.tsx, services.ts, i componenti, i contesti e gli hook elencati. Esamina ogni avviso e ogni errore nel file indicato, quindi esegui nuovamente il comando di lint; il lavoro è completato quando i problemi di lint segnalati sono stati risolti.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

There's a fair number of linting issues for the frontend code that would be good to fix:

root@tomohub:~/code/frontend# npm run lint

> [email protected] lint
> eslint .


/root/code/frontend/src/App.tsx
  11:10  error  'userVisit' is assigned a value but never used
@typescript-eslint/no-unused-vars

/root/code/frontend/src/api/services.ts
  76:37  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/common/Guide.tsx
  2:8  error  'InfoIcon' is defined but never used      @typescript-eslint/no-unused-vars
  3:8  error  'SettingsIcon' is defined but never used  @typescript-eslint/no-unused-vars

/root/code/frontend/src/components/common/Header.tsx
   71:62  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  147:27  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/MethodAccordion.tsx
  16:39  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  20:49  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/ParameterInputFactory.tsx
  13:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  14:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  16:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/inputs/BooleanInput.tsx
  6:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  7:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  9:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/inputs/CenterInput.tsx
  14:17  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  15:10  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  17:21  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  23:3   error  'value' is defined but never used. Allowed unused args must match /^_/u
@typescript-eslint/no-unused-vars

/root/code/frontend/src/components/methods/config/inputs/LiteralInput.tsx
  13:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  14:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  16:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/inputs/NumericInput.tsx
   9:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  10:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  12:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/inputs/TextInput.tsx
  6:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  7:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  9:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/config/inputs/TupleInput.tsx
  6:17  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  7:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  9:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/methods/createMethodComponent.tsx
  11:3  error  'methodType' is defined but never used. Allowed unused args must match /^_/u
@typescript-eslint/no-unused-vars

/root/code/frontend/src/components/pipeline/EditMethodModal.tsx
   24:66  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   36:14  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   51:73  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   59:6   warning  React Hook useEffect has a missing dependency: 'fetchMethodSchema'. Either
include it or remove the dependency array  react-hooks/exhaustive-deps
  112:24  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  137:43  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  144:18  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  178:60  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  189:47  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any

/root/code/frontend/src/components/pipeline/Pipeline.tsx
  43:33  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  70:39  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/pipeline/PipelineMethod.tsx
  23:33  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/workflows/Submission.tsx
  174:10  warning  Fast refresh only works when a file only exports components. Use a new file
to share constants or functions between components  react-refresh/only-export-components

/root/code/frontend/src/components/workflows/SubmissionFormGPURun.tsx
    1:23  error  'graphql' is defined but never used
@typescript-eslint/no-unused-vars
   43:5   error  'method' is assigned a value but never used
@typescript-eslint/no-unused-vars
   44:5   error  'module_path' is assigned a value but never used
@typescript-eslint/no-unused-vars
   45:17  error  'loaderParams' is assigned a value but never used
@typescript-eslint/no-unused-vars
   46:5   error  'isContextValid' is assigned a value but never used
@typescript-eslint/no-unused-vars
   47:5   error  'setDataPath' is assigned a value but never used
@typescript-eslint/no-unused-vars
   48:5   error  'setImageKeyPath' is assigned a value but never used
@typescript-eslint/no-unused-vars
   49:5   error  'setRotationAnglesDataPath' is assigned a value but never used
@typescript-eslint/no-unused-vars
   51:11  error  'methods' is assigned a value but never used
@typescript-eslint/no-unused-vars
  101:34  error  'submitParams' is defined but never used. Allowed unused args must match /^_/u
@typescript-eslint/no-unused-vars

/root/code/frontend/src/components/workflows/WorkflowStatus.tsx
  112:33  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  212:44  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  215:22  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  216:19  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  219:22  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/components/workflows/sweepPipeline/SubmissionFormCOR.tsx
   53:41  warning  React Hook useMemo has an unnecessary dependency: 'schema'. Either exclude
it or remove the dependency array  react-hooks/exhaustive-deps
   65:29  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   66:28  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   67:28  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   73:29  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   74:30  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   75:30  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   76:30  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   78:24  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  104:10  error    'errors' is assigned a value but never used
@typescript-eslint/no-unused-vars
  104:18  error    'setErrors' is assigned a value but never used
@typescript-eslint/no-unused-vars
  108:52  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  115:44  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  116:9   error    'updatedLoaderParams' is never reassigned. Use 'const' instead
prefer-const

/root/code/frontend/src/components/workflows/sweepPipeline/SweepResultViewer.tsx
   16:17  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   87:14  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   94:18  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  250:6   warning  React Hook useEffect has missing dependencies: 'getTiffArtifact' and
'initializeTiffProcessing'. Either include them or remove the dependency array
react-hooks/exhaustive-deps

/root/code/frontend/src/components/workflows/utils/schemaValidation.ts
  29:15  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  52:26  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/contexts/CenterContext.tsx
  20:14  warning  Fast refresh only works when a file only exports components. Use a new file
to share constants or functions between components  react-refresh/only-export-components

/root/code/frontend/src/contexts/LoaderContext.tsx
  116:15  error    'darks' is assigned a value but never used
@typescript-eslint/no-unused-vars
  116:22  error    'flats' is assigned a value but never used
@typescript-eslint/no-unused-vars
  123:15  error    'preview' is assigned a value but never used
@typescript-eslint/no-unused-vars
  244:14  warning  Fast refresh only works when a file only exports components. Use a new file
to share constants or functions between components  react-refresh/only-export-components

/root/code/frontend/src/contexts/MethodsContext.tsx
   12:14  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   22:37  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   28:12  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   45:37  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   70:12  error    Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  110:14  warning  Fast refresh only works when a file only exports components. Use a new file
to share constants or functions between components  react-refresh/only-export-components

/root/code/frontend/src/contexts/SweepContext.tsx
  49:14  warning  Fast refresh only works when a file only exports components. Use a new file
to share constants or functions between components  react-refresh/only-export-components

/root/code/frontend/src/hooks/useHTTOMOConfig.ts
   16:37  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   16:43  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   21:33  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   41:32  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
   71:9   error  'updatedParameters' is never reassigned. Use 'const' instead  prefer-const
  127:53  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any

/root/code/frontend/src/hooks/useSweepConfiguration.ts
  44:46  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  53:48  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/types/APIresponse.d.ts
   2:3   error  Delete `··`                                       prettier/prettier
   3:1   error  Replace `········` with `····`                    prettier/prettier
   4:1   error  Replace `············` with `······`              prettier/prettier
   5:1   error  Replace `············` with `······`              prettier/prettier
   6:1   error  Replace `············` with `······`              prettier/prettier
   7:1   error  Replace `············` with `······`              prettier/prettier
   8:1   error  Replace `············` with `······`              prettier/prettier
   9:1   error  Replace `················` with `········`        prettier/prettier
  10:1   error  Replace `····················` with `··········`  prettier/prettier
  11:1   error  Replace `····················` with `··········`  prettier/prettier
  11:28  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  12:1   error  Replace `····················` with `··········`  prettier/prettier
  13:9   error  Delete `········`                                 prettier/prettier
  14:1   error  Replace `············` with `······`              prettier/prettier
  15:1   error  Replace `········` with `····`                    prettier/prettier
  16:1   error  Delete `··`                                       prettier/prettier
  20:3   error  Delete `··`                                       prettier/prettier
  21:1   error  Delete `··`                                       prettier/prettier
  24:3   error  Delete `··`                                       prettier/prettier
  25:1   error  Replace `········` with `····`                    prettier/prettier
  26:7   error  Delete `······`                                   prettier/prettier
  27:1   error  Replace `············` with `······`              prettier/prettier
  28:1   error  Replace `················` with `········`        prettier/prettier
  28:32  error  Unexpected any. Specify a different type
@typescript-eslint/no-explicit-any
  29:1   error  Replace `············` with `······`              prettier/prettier
  30:1   error  Replace `········` with `····`                    prettier/prettier
  31:1   error  Delete `··`                                       prettier/prettier

/root/code/frontend/src/types/APIresponse.ts
  11:18  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  31:24  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/types/index.d.ts
   2:3   error  Delete `··`                               prettier/prettier
   3:1   error  Replace `····` with `··`                  prettier/prettier
   3:12  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   4:1   error  Delete `··`                               prettier/prettier
   7:1   error  Replace `····` with `··`                  prettier/prettier
   8:1   error  Replace `····` with `··`                  prettier/prettier
   9:1   error  Replace `····` with `··`                  prettier/prettier
  10:1   error  Delete `··`                               prettier/prettier
  10:12  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  11:3   error  Delete `··`                               prettier/prettier
  12:1   error  Delete `··`                               prettier/prettier
  12:23  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  15:3   error  Delete `··`                               prettier/prettier
  16:1   error  Replace `····` with `··`                  prettier/prettier
  17:1   error  Replace `····` with `··`                  prettier/prettier
  18:1   error  Replace `····` with `··`                  prettier/prettier
  19:1   error  Delete `··`                               prettier/prettier

/root/code/frontend/src/types/index.ts
   3:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  11:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  13:21  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/root/code/frontend/src/types/method.d.ts
   2:3  error  Delete `··`  prettier/prettier
   3:1  error  Delete `··`  prettier/prettier
   4:3  error  Delete `··`  prettier/prettier
   7:1  error  Delete `··`  prettier/prettier
   8:3  error  Delete `··`  prettier/prettier
   9:1  error  Delete `··`  prettier/prettier
  10:3  error  Delete `··`  prettier/prettier
  11:1  error  Delete `··`  prettier/prettier

✖ 156 problems (148 errors, 8 warnings)
  49 errors and 0 warnings potentially fixable with the `--fix` option.
Lingua principale
TypeScript
Stelle
2
Fork
1
Merge medio
17h 16m
PR unite (30g)
44

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di DiamondLightSource/ImagingHub

Tutte le issue di DiamondLightSource/ImagingHub

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.