Skip to content

Commit

Permalink
[web] tsc when linting (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnvr authored May 10, 2024
2 parents 9e3a842 + 4c1f1b5 commit d36226e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/web-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Deploy (photos)"
name: "Deploy (web)"

on:
schedule:
Expand Down
18 changes: 18 additions & 0 deletions web/apps/photos/src/worker/ffmpeg.worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ import {
inputPathPlaceholder,
outputPathPlaceholder,
} from "constants/ffmpeg";

// When we run tsc on CI, the line below errors out
//
// > Error: src/worker/ffmpeg.worker.ts(10,38): error TS2307: Cannot find module
// 'ffmpeg-wasm' or its corresponding type declarations.
//
// Building and running works fine. And this error does not occur when running
// tsc locally either.
//
// Of course, there is some misconfiguration, but we plan to move off our old
// fork and onto upstream ffmpeg-wasm, and the reason can be figured out then.
// For now, disable the error to allow the CI lint to complete.
//
// Note that we can't use @ts-expect-error since it doesn't error out when
// actually building!
//
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import { FFmpeg, createFFmpeg } from "ffmpeg-wasm";

export class DedicatedFFmpegWorker {
Expand Down
4 changes: 2 additions & 2 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"dev:payments": "yarn workspace payments dev",
"dev:photos": "yarn workspace photos next dev",
"dev:staff": "yarn workspace staff dev",
"lint": "yarn prettier --check --log-level warn . && yarn workspaces run eslint --report-unused-disable-directives .",
"lint-fix": "yarn prettier --write --log-level warn . && yarn workspaces run eslint --fix .",
"lint": "yarn prettier --check --log-level warn . && yarn workspaces run eslint --report-unused-disable-directives . && yarn workspaces run tsc",
"lint-fix": "yarn prettier --write --log-level warn . && yarn workspaces run eslint --fix . && yarn workspaces run tsc",
"preview": "yarn preview:photos",
"preview:accounts": "yarn build:accounts && python3 -m http.server -d apps/accounts/out 3001",
"preview:auth": "yarn build:auth && python3 -m http.server -d apps/auth/out 3000",
Expand Down

0 comments on commit d36226e

Please sign in to comment.