From 5560c44766392f6a0b0284ffac99c8003b8cb78e Mon Sep 17 00:00:00 2001 From: igor Date: Fri, 1 Dec 2023 13:05:17 +0200 Subject: [PATCH] Disable no explicit any rule for demo. --- p2p-media-loader-demo/.eslintrc.cjs | 31 ++++++++++++++------------- p2p-media-loader-demo/src/App.tsx | 2 -- p2p-media-loader-demo/src/global.d.ts | 4 ---- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/p2p-media-loader-demo/.eslintrc.cjs b/p2p-media-loader-demo/.eslintrc.cjs index ff95cbca..688f40c4 100644 --- a/p2p-media-loader-demo/.eslintrc.cjs +++ b/p2p-media-loader-demo/.eslintrc.cjs @@ -1,17 +1,18 @@ module.exports = { - env: {es2020: true}, - extends: ["../.eslintrc.common.cjs", "plugin:react-hooks/recommended"], - parser: "@typescript-eslint/parser", - parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - project: "tsconfig.json", - tsconfigRootDir: __dirname, - }, - plugins: ["react-refresh"], - rules: { - "react-refresh/only-export-components": "warn", - "@typescript-eslint/ban-ts-comment": 0, - "react-hooks/exhaustive-deps": 0 - }, + env: {es2020: true}, + extends: ["../.eslintrc.common.cjs", "plugin:react-hooks/recommended"], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaVersion: "latest", + sourceType: "module", + project: "tsconfig.json", + tsconfigRootDir: __dirname, + }, + plugins: ["react-refresh"], + rules: { + "react-refresh/only-export-components": "warn", + "@typescript-eslint/ban-ts-comment": 0, + "react-hooks/exhaustive-deps": 0, + "@typescript-eslint/no-explicit-any": 0 + }, }; diff --git a/p2p-media-loader-demo/src/App.tsx b/p2p-media-loader-demo/src/App.tsx index 6c060306..052508be 100644 --- a/p2p-media-loader-demo/src/App.tsx +++ b/p2p-media-loader-demo/src/App.tsx @@ -160,7 +160,6 @@ function App() { const engine = hlsEngine.current; if (!engine) return; - // eslint-disable-next-line @typescript-eslint/no-explicit-any const clapprPlayer: any = new window.Clappr.Player({ parentId: "#player-container", source: url, @@ -235,7 +234,6 @@ function App() { parentId: "#player-container", source: url, plugins: [window.DashShakaPlayback, window.LevelSelector], - // eslint-disable-next-line @typescript-eslint/no-explicit-any shakaOnBeforeLoad: (shakaPlayerInstance: any) => { engine.initShakaPlayer(shakaPlayerInstance); }, diff --git a/p2p-media-loader-demo/src/global.d.ts b/p2p-media-loader-demo/src/global.d.ts index 2f7cb7d0..4a81486a 100644 --- a/p2p-media-loader-demo/src/global.d.ts +++ b/p2p-media-loader-demo/src/global.d.ts @@ -1,12 +1,8 @@ declare global { interface Window { - // eslint-disable-next-line @typescript-eslint/no-explicit-any Clappr: any; - // eslint-disable-next-line @typescript-eslint/no-explicit-any LevelSelector: any; - // eslint-disable-next-line @typescript-eslint/no-explicit-any DashShakaPlayback: any; - // eslint-disable-next-line @typescript-eslint/no-explicit-any shaka: any; } }