[web] tsc when linting (#1681)

This commit is contained in:
Manav Rathi
2024-05-10 22:50:50 +05:30
committed by GitHub
3 changed files with 21 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
name: "Deploy (photos)"
name: "Deploy (web)"
on:
schedule:

View File

@@ -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 {

View File

@@ -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",