Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
ci: fix ESLint tests (#2)
Browse files Browse the repository at this point in the history
* fix: Disabling eslint for ignoring tsc errors

* trying to use ts-expect-error

* fix: Disabling eslint and ignoring tsc errors

* fix: Added prism-media to dependencies

* fix: Force installing packages
  • Loading branch information
EhsanFox authored Apr 21, 2022
1 parent dd265be commit 754cc47
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
node-version: 16

- name: Install dependencies
run: npm install
run: npm install --force

- name: Run ESLint
run: npm run lint

- name: Run TSC
run: npm run build:check
run: npm run build:check
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"ytdl-core": "^4.11.0"
},
"dependencies": {
"@discordjs/voice": "^0.8.0"
"@discordjs/voice": "^0.8.0",
"prism-media": "^1.3.2"
}
}
4 changes: 3 additions & 1 deletion src/smoothVolume/injection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { VolumeTransformer as VolumeTransformerMock } from "./VolumeTransformer"

export function injectSmoothVolume() {
try {
// eslint-disable-next-line
/* eslint-disable */
// @ts-ignore
const mod = require("prism-media") as typeof import("prism-media") & { VolumeTransformer: typeof VolumeTransformerMock };
/* eslint-enable */

if (typeof mod.VolumeTransformer.hasSmoothing !== "boolean") {
Reflect.set(mod, "VolumeTransformer", VolumeTransformerMock);
Expand Down

0 comments on commit 754cc47

Please sign in to comment.