diff --git a/.vscode/settings.json b/.vscode/settings.json index 348680a7..0e60dd2f 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/eslint.config.mjs b/eslint.config.mjs index 366e1556..881e1594 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -17,7 +17,9 @@ export default antfu({ indent: 2, quotes: 'single', }, - ignores: ['node_modules', 'dist'], + // Many are ignored by default. + // https://github.com/antfu/eslint-config/blob/main/src/globs.ts#L56 + ignores: ['**/.astro/'], plugins: { 'jsx-a11y': jsxA11y, }, diff --git a/examples/html-demo/package.json b/examples/html-demo/package.json index 94391b42..92c9f439 100644 --- a/examples/html-demo/package.json +++ b/examples/html-demo/package.json @@ -1,9 +1,9 @@ { "name": "html-demo", - "version": "1.0.0", - "description": "HTML example for Video.js 10", - "private": true, "type": "module", + "version": "1.0.0", + "private": true, + "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 7a38dee5..643122a9 100644 --- a/examples/react-demo/package.json +++ b/examples/react-demo/package.json @@ -1,9 +1,9 @@ { "name": "react-demo", - "version": "1.0.0", - "description": "React example for Video.js 10", - "private": true, "type": "module", + "version": "1.0.0", + "private": true, + "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 23c503a1..ec0e4c8a 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 ( <>
-