Skip to content

Commit

Permalink
fix: type errors
Browse files Browse the repository at this point in the history
Signed-off-by: Fernando Fernández <[email protected]>
  • Loading branch information
ferferga committed Jan 10, 2025
1 parent 60ba9fe commit 46cb7c9
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 6 deletions.
2 changes: 2 additions & 0 deletions frontend/src/plugins/workers/blurhash-decoder.worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="WebWorker" />

import { decode } from 'blurhash';
import { expose } from 'comlink';
import { sealed } from '@jellyfin-vue/shared/validation';
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/plugins/workers/canvas-drawer.worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="WebWorker" />

import { expose } from 'comlink';
import { sealed } from '@jellyfin-vue/shared/validation';

Expand Down
2 changes: 2 additions & 0 deletions frontend/src/plugins/workers/generic.worker.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="WebWorker" />

import { expose } from 'comlink';
import { sealed } from '@jellyfin-vue/shared/validation';
import { parseVttFile } from './generic/subtitles';
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/plugins/workers/generic/subtitles.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="WebWorker" />

/**
* Helper for subtitle manipulation and subtitle-related utility functions
*/
Expand Down
4 changes: 1 addition & 3 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
"compilerOptions": {
"baseUrl": ".",
"lib": [
"ESNext",
"DOM",
"WebWorker"
"DOM"
],
"types": [
"axios",
Expand Down
4 changes: 2 additions & 2 deletions packages/configs/src/lint/rules/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function getBaseConfig(packageName: string, forceCache = !CI_environment,
* correct flags for each monorepo package.
* We check for eslint directly to avoid messing up with other packages reading this file, like @eslint/config-inspector.
*/
if (cliOverrides && basename(process.argv[1]) === 'eslint') {
if (cliOverrides && process.argv[1] && basename(process.argv[1]) === 'eslint') {
const newArgs = process.argv.slice(1);

if (forceCache && !(newArgs.includes('--cache') && newArgs.includes('--cache-location'))) {
Expand All @@ -48,7 +48,7 @@ export function getBaseConfig(packageName: string, forceCache = !CI_environment,

const argsHaveChanged = new Set(newArgs).difference(new Set(process.argv.slice(1))).size > 0;

if (argsHaveChanged) {
if (argsHaveChanged && process.argv[0]) {
console.log();

const result = spawnSync(process.argv[0], newArgs, {
Expand Down
1 change: 1 addition & 0 deletions packages/configs/src/lint/rules/i18n.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Linter } from 'eslint';
// @ts-expect-error - The original plugin doesn't have types
import i18nPlugin from '@intlify/eslint-plugin-vue-i18n';
import { vueAndTsFiles } from '../shared';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui-toolkit/src/components/JVirtual/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ const scrollTargets = computed(() => {
* == VIRTUAL SCROLLING LOGIC ==
*/
useResizeObserver(probeRef, (entries) => {
itemRect.value = entries[0].contentRect;
itemRect.value = entries[0]?.contentRect;
});
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/// <reference lib="WebWorker" />

import { expose } from 'comlink';
import { sealed } from '@jellyfin-vue/shared/validation';
import { getItemOffsetByIndex, type ResizeMeasurement, type BufferMeta, type InternalItem } from './pipeline';
Expand Down
3 changes: 3 additions & 0 deletions packages/ui-toolkit/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"extends": "@jellyfin-vue/configs/typescript",
"compilerOptions": {
"baseUrl": ".",
"lib": [
"DOM"
],
"types": [
"vite/client",
"vue"
Expand Down

0 comments on commit 46cb7c9

Please sign in to comment.