Skip to content

Commit 46cb7c9

Browse files
committed
fix: type errors
Signed-off-by: Fernando Fernández <ferferga@hotmail.com>
1 parent 60ba9fe commit 46cb7c9

File tree

10 files changed

+18
-6
lines changed

10 files changed

+18
-6
lines changed

frontend/src/plugins/workers/blurhash-decoder.worker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference lib="WebWorker" />
2+
13
import { decode } from 'blurhash';
24
import { expose } from 'comlink';
35
import { sealed } from '@jellyfin-vue/shared/validation';

frontend/src/plugins/workers/canvas-drawer.worker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference lib="WebWorker" />
2+
13
import { expose } from 'comlink';
24
import { sealed } from '@jellyfin-vue/shared/validation';
35

frontend/src/plugins/workers/generic.worker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference lib="WebWorker" />
2+
13
import { expose } from 'comlink';
24
import { sealed } from '@jellyfin-vue/shared/validation';
35
import { parseVttFile } from './generic/subtitles';

frontend/src/plugins/workers/generic/subtitles.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference lib="WebWorker" />
2+
13
/**
24
* Helper for subtitle manipulation and subtitle-related utility functions
35
*/

frontend/tsconfig.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
"compilerOptions": {
44
"baseUrl": ".",
55
"lib": [
6-
"ESNext",
7-
"DOM",
8-
"WebWorker"
6+
"DOM"
97
],
108
"types": [
119
"axios",

packages/configs/src/lint/rules/base.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function getBaseConfig(packageName: string, forceCache = !CI_environment,
3131
* correct flags for each monorepo package.
3232
* We check for eslint directly to avoid messing up with other packages reading this file, like @eslint/config-inspector.
3333
*/
34-
if (cliOverrides && basename(process.argv[1]) === 'eslint') {
34+
if (cliOverrides && process.argv[1] && basename(process.argv[1]) === 'eslint') {
3535
const newArgs = process.argv.slice(1);
3636

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

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

51-
if (argsHaveChanged) {
51+
if (argsHaveChanged && process.argv[0]) {
5252
console.log();
5353

5454
const result = spawnSync(process.argv[0], newArgs, {

packages/configs/src/lint/rules/i18n.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { Linter } from 'eslint';
2+
// @ts-expect-error - The original plugin doesn't have types
23
import i18nPlugin from '@intlify/eslint-plugin-vue-i18n';
34
import { vueAndTsFiles } from '../shared';
45

packages/ui-toolkit/src/components/JVirtual/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ const scrollTargets = computed(() => {
229229
* == VIRTUAL SCROLLING LOGIC ==
230230
*/
231231
useResizeObserver(probeRef, (entries) => {
232-
itemRect.value = entries[0].contentRect;
232+
itemRect.value = entries[0]?.contentRect;
233233
});
234234
235235
/**

packages/ui-toolkit/src/components/JVirtual/j-virtual.worker.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/// <reference lib="WebWorker" />
2+
13
import { expose } from 'comlink';
24
import { sealed } from '@jellyfin-vue/shared/validation';
35
import { getItemOffsetByIndex, type ResizeMeasurement, type BufferMeta, type InternalItem } from './pipeline';

packages/ui-toolkit/tsconfig.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"extends": "@jellyfin-vue/configs/typescript",
33
"compilerOptions": {
44
"baseUrl": ".",
5+
"lib": [
6+
"DOM"
7+
],
58
"types": [
69
"vite/client",
710
"vue"

0 commit comments

Comments
 (0)