From 351e25f0b524b1204e64c964345775f1fb33d888 Mon Sep 17 00:00:00 2001 From: Wesley Luyten Date: Wed, 8 Oct 2025 17:28:05 -0500 Subject: [PATCH 1/3] fix: enable eslint & run eslint:fix --- .vscode/settings.json | 6 +- examples/html-demo/package.json | 4 +- examples/react-demo/package.json | 4 +- examples/react-demo/src/App.tsx | 32 +-- examples/react-demo/src/globals.css | 4 +- examples/react-demo/tsconfig.json | 4 +- examples/react-demo/vite.config.ts | 4 +- package.json | 1 + packages/core/core/package.json | 24 +-- packages/core/core/src/components/range.ts | 6 +- .../core/core/src/components/time-range.ts | 10 +- .../core/core/src/components/volume-range.ts | 7 +- packages/core/core/src/utils/state.ts | 8 +- packages/core/icons/assets/play.svg | 4 +- packages/core/icons/assets/volume-high.svg | 10 +- packages/core/icons/assets/volume-low.svg | 7 +- packages/core/icons/assets/volume-off.svg | 7 +- packages/core/icons/package.json | 22 +-- packages/core/icons/src/index.ts | 2 +- packages/core/media-store/package.json | 22 +-- .../component-state-definitions/time-range.ts | 2 +- .../volume-range.ts | 4 +- packages/core/media-store/src/factory.ts | 42 ++-- packages/core/media-store/src/index.ts | 16 +- packages/core/media-store/src/media-store.ts | 5 +- .../src/state-mediators/fullscreenable.ts | 42 ++-- .../media-store/src/state-mediators/index.ts | 2 +- .../src/state-mediators/playable.ts | 4 +- .../src/state-mediators/temporal.ts | 18 +- packages/core/media-store/src/utils/time.ts | 12 +- packages/core/media/package.json | 22 +-- packages/core/media/src/index.ts | 4 +- packages/core/media/src/playable.ts | 12 +- packages/core/playback-engine/package.json | 24 +-- packages/core/playback-engine/src/index.ts | 2 +- packages/html/html-icons/package.json | 24 +-- packages/html/html-icons/src/index.ts | 6 +- .../html/html-media-elements/package.json | 24 +-- packages/html/html-media-store/package.json | 22 +-- packages/html/html/package.json | 22 +-- .../src/components/media-chrome-button.ts | 2 +- .../components/media-current-time-display.ts | 14 +- .../src/components/media-duration-display.ts | 10 +- .../src/components/media-fullscreen-button.ts | 25 +-- .../html/src/components/media-mute-button.ts | 33 ++-- .../html/src/components/media-play-button.ts | 17 +- .../html/html/src/components/media-popover.ts | 9 +- .../html/src/components/media-time-range.ts | 46 +++-- .../html/html/src/components/media-tooltip.ts | 23 ++- .../html/src/components/media-volume-range.ts | 49 ++--- packages/html/html/src/index.ts | 12 +- .../html/html/src/skins/media-skin-default.ts | 4 +- .../html/html/src/utils/component-factory.ts | 17 +- .../react-native-icons/package.json | 22 +-- .../react-native-icons/tsconfig.json | 6 +- .../react-native-media-elements/package.json | 22 +-- .../react-native-media-elements/src/index.ts | 8 +- .../react-native-media-elements/tsconfig.json | 6 +- .../react-native/react-native/package.json | 28 +-- .../react-native/react-native/tsconfig.json | 6 +- packages/react/react-icons/package.json | 28 +-- packages/react/react-icons/svgr.config.js | 8 +- packages/react/react-icons/tsconfig.json | 6 +- .../react/react-media-elements/package.json | 28 +-- .../react/react-media-elements/src/index.ts | 4 +- .../src/media-elements.tsx | 22 +-- .../react/react-media-elements/tsconfig.json | 6 +- packages/react/react-media-store/package.json | 30 +-- .../react-media-store/src/MediaProvider.tsx | 37 ++-- packages/react/react-media-store/src/index.ts | 6 +- .../src/useSyncExternalStoreWithSelector.ts | 25 +-- .../react/react-media-store/tsconfig.json | 6 +- packages/react/react/package.json | 28 +-- .../src/components/CurrentTimeDisplay.tsx | 34 ++-- .../react/src/components/DurationDisplay.tsx | 22 +-- .../react/src/components/FullscreenButton.tsx | 40 ++-- .../react/src/components/MediaContainer.tsx | 10 +- .../react/react/src/components/MuteButton.tsx | 38 ++-- .../react/react/src/components/PlayButton.tsx | 36 ++-- .../react/react/src/components/Popover.tsx | 4 +- .../react/react/src/components/TimeRange.tsx | 84 ++++---- .../react/react/src/components/Tooltip.tsx | 18 +- packages/react/react/src/components/Video.tsx | 22 +-- .../react/src/components/VolumeRange.tsx | 69 +++---- packages/react/react/src/index.ts | 16 +- .../src/skins/default/MediaSkinDefault.tsx | 6 +- .../react/react/src/skins/default/index.ts | 2 +- .../react/react/src/skins/default/styles.ts | 34 ++-- packages/react/react/src/skins/index.ts | 4 +- .../src/skins/toasted/MediaSkinToasted.tsx | 7 +- .../react/react/src/skins/toasted/index.ts | 2 +- .../react/react/src/skins/toasted/styles.ts | 4 +- .../react/react/src/skins/toasted/types.ts | 2 +- packages/react/react/src/utils/cn.ts | 2 +- .../react/src/utils/component-factory.tsx | 37 ++-- .../react/react/src/utils/useComposedRefs.ts | 6 +- packages/react/react/tsconfig.json | 6 +- pnpm-workspace.yaml | 2 +- tsconfig.base.json | 28 +-- website/README.md | 12 +- website/TODO.md | 2 +- website/astro.config.mjs | 4 +- website/public/favicon.svg | 10 +- website/src/components/docs/Selectors.tsx | 23 ++- website/src/config/docs/sidebar.ts | 24 +-- website/src/content.config.ts | 187 +++++++++--------- website/src/content/authors.json | 58 +++--- .../blog/2024-07-19-markdown-style-guide.md | 4 +- website/src/pages/rss.xml.js | 22 +-- website/src/types/docs.ts | 44 ++--- website/src/utils/docs/redirects.ts | 23 +-- website/src/utils/docs/sidebar.ts | 181 ++++++++--------- website/src/utils/globWithParser.ts | 83 ++++---- website/tsconfig.json | 22 +-- 114 files changed, 1156 insertions(+), 1168 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 348680a7d..0e60dd2f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,9 +1,9 @@ { // At some point, we'll watch to flick this on and uncomment lines 5 & 6 below. - "eslint.enable": false, + "eslint.enable": true, // Disable the default formatter, use eslint instead - // "prettier.enable": false, - // "editor.formatOnSave": false, + "prettier.enable": false, + "editor.formatOnSave": false, // Auto fix "editor.codeActionsOnSave": { diff --git a/examples/html-demo/package.json b/examples/html-demo/package.json index 94391b42a..92c9f4394 100644 --- a/examples/html-demo/package.json +++ b/examples/html-demo/package.json @@ -1,9 +1,9 @@ { "name": "html-demo", + "type": "module", "version": "1.0.0", - "description": "HTML example for Video.js 10", "private": true, - "type": "module", + "description": "HTML example for Video.js 10", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/react-demo/package.json b/examples/react-demo/package.json index 7a38dee58..643122a90 100644 --- a/examples/react-demo/package.json +++ b/examples/react-demo/package.json @@ -1,9 +1,9 @@ { "name": "react-demo", + "type": "module", "version": "1.0.0", - "description": "React example for Video.js 10", "private": true, - "type": "module", + "description": "React example for Video.js 10", "scripts": { "dev": "vite", "build": "vite build", diff --git a/examples/react-demo/src/App.tsx b/examples/react-demo/src/App.tsx index 23c503a11..ec0e4c8ac 100644 --- a/examples/react-demo/src/App.tsx +++ b/examples/react-demo/src/App.tsx @@ -1,7 +1,8 @@ -import { MediaProvider, MediaSkinDefault, MediaSkinToasted, Video } from '@vjs-10/react'; +import type { ChangeEventHandler } from 'react'; +import { MediaProvider, MediaSkinDefault, MediaSkinToasted, Video } from '@vjs-10/react'; +import { useCallback, useMemo, useState } from 'react'; import './globals.css'; -import { useCallback, useMemo, useState, type ChangeEventHandler } from 'react'; const skins = [{ key: 'default', @@ -18,19 +19,19 @@ type SkinKey = (typeof skins)[number]['key']; const mediaSources = [{ key: '1', name: 'Mux 1', - value: 'https://stream.mux.com/fXNzVtmtWuyz00xnSrJg4OJH6PyNo6D02UzmgeKGkP5YQ.m3u8' + value: 'https://stream.mux.com/fXNzVtmtWuyz00xnSrJg4OJH6PyNo6D02UzmgeKGkP5YQ.m3u8', }, { key: '2', name: 'Mux 2', - value: 'https://stream.mux.com/a4nOgmxGWg6gULfcBbAa00gXyfcwPnAFldF8RdsNyk8M.m3u8' + value: 'https://stream.mux.com/a4nOgmxGWg6gULfcBbAa00gXyfcwPnAFldF8RdsNyk8M.m3u8', }, { key: '3', name: 'Mux 3', - value: 'https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/high.mp4' + value: 'https://stream.mux.com/A3VXy02VoUinw01pwyomEO3bHnG4P32xzV7u1j1FSzjNg/high.mp4', }, { key: '4', name: 'Mux 4', - value: 'https://stream.mux.com/lyrKpPcGfqyzeI00jZAfW6MvP6GNPrkML.m3u8' + value: 'https://stream.mux.com/lyrKpPcGfqyzeI00jZAfW6MvP6GNPrkML.m3u8', }] as const; type MediaSourceKey = (typeof mediaSources)[number]['key']; @@ -103,21 +104,21 @@ export default function App(): JSX.Element { return ( <>
-