This repository has been archived by the owner on Nov 11, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use @stegripe/eslint-config (#1432)
* chore: use @stegripe/eslint-config * chore(eslint-config): extend more * chore: update script * fix(eslint-config): wrong usage * chore(deps): update lockfile * fix(typescript): change some compiler option * fix(eslint): properly ignore directories * fix(*): adjust codes with linter requirements * feat: patch for play-dl strategy * chore(deps): update lockfile --------- Co-authored-by: Mednoob <[email protected]>
- Loading branch information
Showing
91 changed files
with
3,196 additions
and
1,395 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 |
---|---|---|
|
@@ -103,3 +103,4 @@ dist | |
# Rawon cache directories and files | ||
data.json | ||
scripts/ | ||
play-dl-fix/ |
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,17 @@ | ||
import nodePath from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
import { includeIgnoreFile } from "@eslint/compat"; | ||
import { common, modules, node, prettier, typescript, extend, ignores } from "@stegripe/eslint-config"; | ||
|
||
const gitIgnore = nodePath.resolve(fileURLToPath(import.meta.url), "..", ".gitignore"); | ||
|
||
export default [...common, ...modules, ...node, ...prettier, ...extend(typescript, [{ | ||
rule: "typescript/no-unnecessary-condition", | ||
option: ["off"] | ||
}], ...ignores), includeIgnoreFile(gitIgnore), { | ||
ignores: [ | ||
"yt-dlp-utils/*", | ||
"play-dl-importer/*", | ||
"play-dl-fix/*" | ||
] | ||
}]; |
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
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,14 @@ | ||
import { Readable } from "node:stream"; | ||
|
||
export default { | ||
stream: async (url: string, options: { discordPlayerCompatibility: boolean }): Promise<{ stream: Readable }> => {}, | ||
video_basic_info: async (url: string): Promise<{ | ||
video_details: { | ||
durationInSec: number; | ||
id: string | null; | ||
thumbnails: { url: string; width: number; height: number }[]; | ||
title: string | null; | ||
url: string; | ||
} | ||
}> => {} | ||
}; |
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,16 @@ | ||
import { existsSync } from "node:fs"; | ||
import module from "node:module"; | ||
import nodePath from "node:path"; | ||
import { fileURLToPath } from "node:url"; | ||
|
||
// eslint-disable-next-line import/no-mutable-exports | ||
let mod; | ||
|
||
if (existsSync(nodePath.resolve(fileURLToPath(import.meta.url), "..", "..", "play-dl-fix"))) { | ||
mod = await import("../play-dl-fix/dist/index.mjs"); | ||
} else { | ||
const require = module.createRequire(nodePath.resolve(fileURLToPath(import.meta.url), "..")); | ||
mod = require("play-dl"); | ||
} | ||
|
||
export default mod; |
Oops, something went wrong.