forked from aiko-chan-ai/Discord-video-experiment
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Biomejs for linting (and maybe formatting?) (#136)
* Add Biome * fix lint: utils.ts * Don't lint examples Don't think this needs to be linted yet, although it can be beneficial * fix lint: AudioPacketizer.ts * fix lint: BaseMediaPacketizer.ts * fix lint: VideoPacketizerAnnexB.ts * fix lint: VideoPacketizerVP8.ts * fix lint: AnnexBHelper.ts * fix lint: BaseMediaConnection.ts * Consolidates all WebRTC parameters into one object * fix lint: VoiceConnection.ts * Use event emitter to remove all ugly non-null assertions * fix lint: AudioStream.ts * fix lint: BaseMediaStream.ts * fix lint: LibavCodecId.ts * fix lint: LibavDemuxer.ts * fix lint: newApi.ts * fix lint: streamLivestreamVideo.ts * fix lint: VideoStream.ts * Wrong library * ts-expect-error bit me * why * Set up automatic linting * Disable import organizing
- Loading branch information
1 parent
a2a2376
commit e7090a5
Showing
22 changed files
with
358 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Linting | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Biome | ||
uses: biomejs/setup-biome@v2 | ||
with: | ||
version: latest | ||
- name: Run Biome | ||
run: biome ci . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"useIgnoreFile": true | ||
}, | ||
"files": { | ||
"ignoreUnknown": false, | ||
"ignore": ["./examples/**/*"] | ||
}, | ||
"formatter": { | ||
"enabled": false, | ||
"indentStyle": "tab" | ||
}, | ||
"organizeImports": { | ||
"enabled": false | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"quoteStyle": "double" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
type GatewayEventGeneric<Type extends string = string, Data = unknown> = { | ||
t: Type, | ||
d: Data | ||
} | ||
|
||
export namespace GatewayEvent { | ||
export type VoiceStateUpdate = GatewayEventGeneric< | ||
"VOICE_STATE_UPDATE", { | ||
user_id: string, | ||
session_id: string | ||
} | ||
> | ||
export type VoiceServerUpdate = GatewayEventGeneric< | ||
"VOICE_SERVER_UPDATE", { | ||
guild_id: string, | ||
endpoint: string, | ||
token: string | ||
} | ||
> | ||
export type StreamCreate = GatewayEventGeneric< | ||
"STREAM_CREATE", { | ||
stream_key: string, | ||
rtc_server_id: string | ||
} | ||
> | ||
export type StreamServerUpdate = GatewayEventGeneric< | ||
"STREAM_SERVER_UPDATE", { | ||
stream_key: string, | ||
endpoint: string, | ||
token: string | ||
} | ||
> | ||
} | ||
|
||
|
||
export type GatewayEvent = | ||
GatewayEvent.VoiceStateUpdate | | ||
GatewayEvent.VoiceServerUpdate | | ||
GatewayEvent.StreamCreate | | ||
GatewayEvent.StreamServerUpdate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.