pnpm lint and update packages

This commit is contained in:
Cooper 2024-07-13 18:13:40 +00:00
parent e1693a0723
commit 9298c4a552
8 changed files with 25 additions and 22 deletions

View File

@ -116,7 +116,7 @@
"postcss": "^8.4.39", "postcss": "^8.4.39",
"postcss-rtl": "^2.0.0", "postcss-rtl": "^2.0.0",
"postcss-rtlcss": "^4.0.9", "postcss-rtlcss": "^4.0.9",
"prettier": "^3.3.2", "prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.5.14", "prettier-plugin-tailwindcss": "^0.5.14",
"rollup-plugin-visualizer": "^5.12.0", "rollup-plugin-visualizer": "^5.12.0",
"tailwind-scrollbar": "^3.1.0", "tailwind-scrollbar": "^3.1.0",

View File

@ -255,7 +255,7 @@ importers:
version: 6.9.0(eslint@8.57.0) version: 6.9.0(eslint@8.57.0)
eslint-plugin-prettier: eslint-plugin-prettier:
specifier: ^5.1.3 specifier: ^5.1.3
version: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2) version: 5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3)
eslint-plugin-react: eslint-plugin-react:
specifier: 7.33.2 specifier: 7.33.2
version: 7.33.2(eslint@8.57.0) version: 7.33.2(eslint@8.57.0)
@ -281,11 +281,11 @@ importers:
specifier: ^4.0.9 specifier: ^4.0.9
version: 4.0.9(postcss@8.4.39) version: 4.0.9(postcss@8.4.39)
prettier: prettier:
specifier: ^3.3.2 specifier: ^3.3.3
version: 3.3.2 version: 3.3.3
prettier-plugin-tailwindcss: prettier-plugin-tailwindcss:
specifier: ^0.5.14 specifier: ^0.5.14
version: 0.5.14(prettier@3.3.2) version: 0.5.14(prettier@3.3.3)
rollup-plugin-visualizer: rollup-plugin-visualizer:
specifier: ^5.12.0 specifier: ^5.12.0
version: 5.12.0(@rollup/wasm-node@4.18.1) version: 5.12.0(@rollup/wasm-node@4.18.1)
@ -3238,8 +3238,8 @@ packages:
prettier-plugin-svelte: prettier-plugin-svelte:
optional: true optional: true
prettier@3.3.2: prettier@3.3.3:
resolution: {integrity: sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==} resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==}
engines: {node: '>=14'} engines: {node: '>=14'}
hasBin: true hasBin: true
@ -6445,10 +6445,10 @@ snapshots:
safe-regex-test: 1.0.3 safe-regex-test: 1.0.3
string.prototype.includes: 2.0.0 string.prototype.includes: 2.0.0
eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.2): eslint-plugin-prettier@5.1.3(eslint-config-prettier@9.1.0(eslint@8.57.0))(eslint@8.57.0)(prettier@3.3.3):
dependencies: dependencies:
eslint: 8.57.0 eslint: 8.57.0
prettier: 3.3.2 prettier: 3.3.3
prettier-linter-helpers: 1.0.0 prettier-linter-helpers: 1.0.0
synckit: 0.8.8 synckit: 0.8.8
optionalDependencies: optionalDependencies:
@ -7510,11 +7510,11 @@ snapshots:
dependencies: dependencies:
fast-diff: 1.3.0 fast-diff: 1.3.0
prettier-plugin-tailwindcss@0.5.14(prettier@3.3.2): prettier-plugin-tailwindcss@0.5.14(prettier@3.3.3):
dependencies: dependencies:
prettier: 3.3.2 prettier: 3.3.3
prettier@3.3.2: {} prettier@3.3.3: {}
pretty-bytes@5.6.0: {} pretty-bytes@5.6.0: {}

View File

@ -126,8 +126,8 @@ export function CaptionsView({
} }
const selectedLanguagePretty = selectedCaptionLanguage const selectedLanguagePretty = selectedCaptionLanguage
? getPrettyLanguageNameFromLocale(selectedCaptionLanguage) ?? ? (getPrettyLanguageNameFromLocale(selectedCaptionLanguage) ??
t("player.menus.subtitles.unknownLanguage") t("player.menus.subtitles.unknownLanguage"))
: undefined; : undefined;
return ( return (

View File

@ -30,7 +30,7 @@ export function OpenSubtitlesCaptionView({
const captions = useMemo( const captions = useMemo(
() => () =>
captionList.length !== 0 ? captionList : getHlsCaptionList?.() ?? [], captionList.length !== 0 ? captionList : (getHlsCaptionList?.() ?? []),
[captionList, getHlsCaptionList], [captionList, getHlsCaptionList],
); );

View File

@ -35,13 +35,13 @@ export function SettingsMenu({ id }: { id: string }) {
const { toggleLastUsed } = useCaptions(); const { toggleLastUsed } = useCaptions();
const selectedLanguagePretty = selectedCaptionLanguage const selectedLanguagePretty = selectedCaptionLanguage
? getPrettyLanguageNameFromLocale(selectedCaptionLanguage) ?? ? (getPrettyLanguageNameFromLocale(selectedCaptionLanguage) ??
t("player.menus.subtitles.unknownLanguage") t("player.menus.subtitles.unknownLanguage"))
: undefined; : undefined;
const selectedAudioLanguagePretty = currentAudioTrack const selectedAudioLanguagePretty = currentAudioTrack
? getPrettyLanguageNameFromLocale(currentAudioTrack.language) ?? ? (getPrettyLanguageNameFromLocale(currentAudioTrack.language) ??
t("player.menus.subtitles.unknownLanguage") t("player.menus.subtitles.unknownLanguage"))
: undefined; : undefined;
const source = usePlayerStore((s) => s.source); const source = usePlayerStore((s) => s.source);

View File

@ -62,7 +62,7 @@ export function SourceCaptionsView({
const captions = useMemo( const captions = useMemo(
() => () =>
captionList.length !== 0 ? captionList : getHlsCaptionList?.() ?? [], captionList.length !== 0 ? captionList : (getHlsCaptionList?.() ?? []),
[captionList, getHlsCaptionList], [captionList, getHlsCaptionList],
); );

View File

@ -266,7 +266,10 @@ export function makeVideoElementDisplayInterface(): DisplayInterface {
videoElement.addEventListener("canplay", () => emit("loading", false)); videoElement.addEventListener("canplay", () => emit("loading", false));
videoElement.addEventListener("waiting", () => emit("loading", true)); videoElement.addEventListener("waiting", () => emit("loading", true));
videoElement.addEventListener("volumechange", () => videoElement.addEventListener("volumechange", () =>
emit("volumechange", videoElement?.muted ? 0 : videoElement?.volume ?? 0), emit(
"volumechange",
videoElement?.muted ? 0 : (videoElement?.volume ?? 0),
),
); );
videoElement.addEventListener("timeupdate", () => videoElement.addEventListener("timeupdate", () =>
emit("time", videoElement?.currentTime ?? 0), emit("time", videoElement?.currentTime ?? 0),

View File

@ -31,7 +31,7 @@ export function useCaptions() {
const captions = useMemo( const captions = useMemo(
() => () =>
captionList.length !== 0 ? captionList : getHlsCaptionList?.() ?? [], captionList.length !== 0 ? captionList : (getHlsCaptionList?.() ?? []),
[captionList, getHlsCaptionList], [captionList, getHlsCaptionList],
); );