whisper-web
whisper-web copied to clipboard
Fix linting issues and remove GPU mention
Should be merged after #57 and #58
This small PR fixes all the errors and warnings raised by npm run lint. I also fixed some formatting issues with npm run format.
A next step is to add a Github Action to check for future linting errors.
Before
src/App.tsx 5:1 error Use "@ts-expect-error" instead of "@ts-ignore", as "@ts-ignore" will do nothing if the following line is error-free @typescript-eslint/ban-ts-comment
src/components/AudioManager.tsx 137:13 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 246:8 warning React Hook useEffect has a missing dependency: 'downloadAudioFromUrl'. Either include it or remove the dependency array react-hooks/exhaustive-deps 381:16 error '_value' is defined but never used @typescript-eslint/no-unused-vars 630:30 error '_data' is defined but never used @typescript-eslint/no-unused-vars
src/hooks/useTranscriber.ts 72:17 error Unexpected lexical declaration in case block no-case-declarations 73:17 error Unexpected lexical declaration in case block no-case-declarations 175:8 warning React Hook useMemo has a missing dependency: 'onInputChange'. Either include it or remove the dependency array react-hooks/exhaustive-deps
src/utils/BlobFix.ts 342:20 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 381:22 error Unexpected any. Specify a different type @typescript-eslint/no-explicit-any 404:13 error Unexpected var, use let or const instead no-var 407:11 error Empty block statement no-empty
✖ 12 problems (9 errors, 3 warnings)
After
Nothing