mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-01-11 22:40:31 +00:00
chore: update eslint
This commit is contained in:
parent
251878bb69
commit
e51e6f415e
67 changed files with 2090 additions and 672 deletions
99
.eslintrc
99
.eslintrc
|
|
@ -1,99 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:react/recommended"
|
||||
],
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
"globals": {
|
||||
"YT": "readonly",
|
||||
"FB": "readonly",
|
||||
"cast": "readonly",
|
||||
"chrome": "readonly"
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"commonjs": true,
|
||||
"browser": true,
|
||||
"es6": true
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11,
|
||||
"ecmaFeatures": {
|
||||
"jsx": true
|
||||
}
|
||||
},
|
||||
"ignorePatterns": [
|
||||
"/*",
|
||||
"!/src"
|
||||
],
|
||||
"rules": {
|
||||
"arrow-parens": "error",
|
||||
"arrow-spacing": "error",
|
||||
"block-spacing": "error",
|
||||
"comma-spacing": "error",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": "error",
|
||||
"func-call-spacing": "error",
|
||||
"indent": [
|
||||
"error",
|
||||
4,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"warn",
|
||||
"error"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-extra-semi": "error",
|
||||
"no-eq-null": "error",
|
||||
"no-multi-spaces": "error",
|
||||
"no-multiple-empty-lines": [
|
||||
"error",
|
||||
{
|
||||
"max": 1
|
||||
}
|
||||
],
|
||||
"no-prototype-builtins": "off",
|
||||
"no-template-curly-in-string": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-useless-concat": "error",
|
||||
"no-unreachable": "error",
|
||||
"no-unused-vars": [
|
||||
"error",
|
||||
{
|
||||
"varsIgnorePattern": "_"
|
||||
}
|
||||
],
|
||||
"prefer-const": "error",
|
||||
"quotes": [
|
||||
"error",
|
||||
"single"
|
||||
],
|
||||
"quote-props": [
|
||||
"error",
|
||||
"as-needed",
|
||||
{
|
||||
"unnecessary": false
|
||||
}
|
||||
],
|
||||
"semi": "error",
|
||||
"semi-spacing": "error",
|
||||
"space-before-blocks": "error",
|
||||
"valid-typeof": [
|
||||
"error",
|
||||
{
|
||||
"requireStringLiterals": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
100
eslint.config.mjs
Normal file
100
eslint.config.mjs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
import globals from 'globals';
|
||||
import pluginJs from '@eslint/js';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import pluginReact from 'eslint-plugin-react';
|
||||
import stylistic from '@stylistic/eslint-plugin'
|
||||
|
||||
export default [
|
||||
pluginJs.configs.recommended,
|
||||
...tseslint.configs.recommended,
|
||||
...tseslint.configs.stylistic,
|
||||
pluginReact.configs.flat.recommended,
|
||||
{
|
||||
plugins: {
|
||||
'@stylistic': stylistic
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}']
|
||||
},
|
||||
{
|
||||
files: ['**/*.js'],
|
||||
languageOptions: {
|
||||
sourceType: 'commonjs',
|
||||
ecmaVersion: 'latest',
|
||||
}
|
||||
},
|
||||
{
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
YT: 'readonly',
|
||||
FB: 'readonly',
|
||||
cast: 'readonly',
|
||||
chrome: 'readonly',
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'no-redeclare': 'off',
|
||||
'eol-last': 'error',
|
||||
'eqeqeq': 'error',
|
||||
'no-console': ['error', {
|
||||
allow: [
|
||||
'warn',
|
||||
'error'
|
||||
]
|
||||
}],
|
||||
}
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@typescript-eslint/no-redeclare': 'off',
|
||||
'@typescript-eslint/no-require-imports': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-empty-object-type': 'off',
|
||||
'@typescript-eslint/no-unused-expressions': 'off',
|
||||
'@typescript-eslint/consistent-type-definitions': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [
|
||||
'error',
|
||||
{
|
||||
'varsIgnorePattern': '_',
|
||||
'caughtErrorsIgnorePattern': '_',
|
||||
}
|
||||
],
|
||||
}
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'@stylistic/arrow-parens': 'error',
|
||||
'@stylistic/arrow-spacing': 'error',
|
||||
'@stylistic/block-spacing': 'error',
|
||||
'@stylistic/comma-spacing': 'error',
|
||||
'@stylistic/semi-spacing': 'error',
|
||||
'@stylistic/space-before-blocks': 'error',
|
||||
'@stylistic/no-trailing-spaces': 'error',
|
||||
'@stylistic/func-call-spacing': 'error',
|
||||
'@stylistic/eol-last': 'error',
|
||||
'@stylistic/no-multi-spaces': 'error',
|
||||
'@stylistic/no-multiple-empty-lines': ['error', {
|
||||
max: 1
|
||||
}],
|
||||
'@stylistic/indent': ['error', 4],
|
||||
'@stylistic/quotes': ['error', 'single'],
|
||||
}
|
||||
},
|
||||
{
|
||||
rules: {
|
||||
'react/display-name': 'off',
|
||||
}
|
||||
}
|
||||
];
|
||||
2418
package-lock.json
generated
2418
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -50,6 +50,9 @@
|
|||
"@babel/plugin-proposal-object-rest-spread": "7.16.0",
|
||||
"@babel/preset-env": "7.16.0",
|
||||
"@babel/preset-react": "7.16.0",
|
||||
"@eslint/js": "^9.12.0",
|
||||
"@stylistic/eslint-plugin": "^2.9.0",
|
||||
"@stylistic/eslint-plugin-jsx": "^2.9.0",
|
||||
"@types/hat": "^0.0.4",
|
||||
"@types/react": "^18.2.9",
|
||||
"babel-loader": "8.2.3",
|
||||
|
|
@ -58,8 +61,9 @@
|
|||
"css-loader": "6.5.0",
|
||||
"cssnano": "5.0.8",
|
||||
"cssnano-preset-advanced": "5.1.4",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-plugin-react": "7.26.1",
|
||||
"eslint": "^9.12.0",
|
||||
"eslint-plugin-react": "^7.37.1",
|
||||
"globals": "^15.10.0",
|
||||
"html-webpack-plugin": "5.5.0",
|
||||
"jest": "27.3.1",
|
||||
"less": "4.1.2",
|
||||
|
|
@ -70,6 +74,7 @@
|
|||
"terser-webpack-plugin": "5.2.4",
|
||||
"ts-loader": "^9.5.1",
|
||||
"typescript": "^5.4.2",
|
||||
"typescript-eslint": "^8.8.0",
|
||||
"webpack": "5.61.0",
|
||||
"webpack-cli": "4.9.1",
|
||||
"webpack-dev-server": "^4.7.4",
|
||||
|
|
|
|||
|
|
@ -42,4 +42,4 @@ const Chip = memo(({ label, value, active, onSelect }: Props) => {
|
|||
);
|
||||
});
|
||||
|
||||
export default Chip;
|
||||
export default Chip;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2017-2024 Smart code 203358507
|
||||
|
||||
import Chip from './Chip';
|
||||
export default Chip;
|
||||
export default Chip;
|
||||
|
|
|
|||
|
|
@ -53,4 +53,4 @@ const Chips = memo(({ options, selected, onSelect }: Props) => {
|
|||
);
|
||||
});
|
||||
|
||||
export default Chips;
|
||||
export default Chips;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2017-2024 Smart code 203358507
|
||||
|
||||
import Chips from './Chips';
|
||||
export default Chips;
|
||||
export default Chips;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ const useCoreSuspender = () => {
|
|||
return React.useContext(CoreSuspenderContext);
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||
const withCoreSuspender = (Component, Fallback = () => { }) => {
|
||||
return function withCoreSuspender(props) {
|
||||
const { core } = useServices();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ const DelayedRenderer = ({ children, delay }) => {
|
|||
};
|
||||
|
||||
DelayedRenderer.propTypes = {
|
||||
children: PropTypes.node
|
||||
children: PropTypes.node,
|
||||
delay: PropTypes.number,
|
||||
};
|
||||
|
||||
module.exports = DelayedRenderer;
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ const Dropdown = ({ level, setLevel, options, onSelect, selectedOption, menuOpen
|
|||
<Icon name={'caret-left'} className={styles['back-button-icon']} />
|
||||
{t('BACK')}
|
||||
</Button>
|
||||
: null
|
||||
: null
|
||||
}
|
||||
{
|
||||
options
|
||||
|
|
@ -46,10 +46,9 @@ const Dropdown = ({ level, setLevel, options, onSelect, selectedOption, menuOpen
|
|||
/>
|
||||
))
|
||||
|
||||
|
||||
}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Dropdown;
|
||||
export default Dropdown;
|
||||
|
|
|
|||
|
|
@ -43,4 +43,4 @@ const Option = ({ option, selectedOption, onSelect }: Props) => {
|
|||
);
|
||||
};
|
||||
|
||||
export default Option;
|
||||
export default Option;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
import Option from './Option';
|
||||
|
||||
export default Option;
|
||||
export default Option;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
import Dropdown from './Dropdown';
|
||||
|
||||
export default Dropdown;
|
||||
export default Dropdown;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ const MultiselectMenu = ({ className, title, options, selectedOption, onSelect }
|
|||
const onOptionSelect = (value: number) => {
|
||||
level ? setLevel(level + 1) : onSelect(value), closeMenu();
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className={classNames(styles['multiselect-menu'], className)} ref={multiselectMenuRef}>
|
||||
<Button
|
||||
|
|
@ -48,10 +48,10 @@ const MultiselectMenu = ({ className, title, options, selectedOption, onSelect }
|
|||
menuOpen={menuOpen}
|
||||
selectedOption={selectedOption}
|
||||
/>
|
||||
: null
|
||||
: null
|
||||
}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default MultiselectMenu;
|
||||
export default MultiselectMenu;
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
import MultiselectMenu from './MultiselectMenu';
|
||||
|
||||
export default MultiselectMenu;
|
||||
export default MultiselectMenu;
|
||||
|
|
|
|||
2
src/common/MultiselectMenu/types.d.ts
vendored
2
src/common/MultiselectMenu/types.d.ts
vendored
|
|
@ -6,4 +6,4 @@ type MultiselectMenuOption = {
|
|||
default?: boolean;
|
||||
hidden?: boolean;
|
||||
level?: MultiselectMenuOption[];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const useLocalSearch: () => { items: LocalSearchItem[], search: (query: string) => void };
|
||||
export = useLocalSearch;
|
||||
export = useLocalSearch;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const useSearchHistory: () => { items: SearchHistory, clear: () => void };
|
||||
export = useSearchHistory;
|
||||
export = useSearchHistory;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const usePlatform = () => {
|
|||
return useContext(PlatformContext);
|
||||
};
|
||||
|
||||
export {
|
||||
export {
|
||||
PlatformProvider,
|
||||
usePlatform
|
||||
};
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ const isMobile = ['ios', 'android'].includes(name);
|
|||
export {
|
||||
name,
|
||||
isMobile,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ import { PlatformProvider, usePlatform } from './Platform';
|
|||
export {
|
||||
PlatformProvider,
|
||||
usePlatform,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,4 +19,4 @@ const useShell = () => {
|
|||
};
|
||||
};
|
||||
|
||||
export default useShell;
|
||||
export default useShell;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
// Copyright (C) 2017-2023 Smart code 203358507
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-empty-function */
|
||||
|
||||
const React = require('react');
|
||||
|
||||
const ToastContext = React.createContext({
|
||||
|
|
|
|||
2
src/common/useNotifications.d.ts
vendored
2
src/common/useNotifications.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useNotifcations: () => Notifications;
|
||||
export = useNotifcations;
|
||||
export = useNotifcations;
|
||||
|
|
|
|||
|
|
@ -24,4 +24,4 @@ const useOutsideClick = (callback: () => void) => {
|
|||
return ref;
|
||||
};
|
||||
|
||||
export default useOutsideClick;
|
||||
export default useOutsideClick;
|
||||
|
|
|
|||
2
src/common/useProfile.d.ts
vendored
2
src/common/useProfile.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useProfile: () => Profile;
|
||||
export = useProfile;
|
||||
export = useProfile;
|
||||
|
|
|
|||
2
src/common/useStreamingServer.d.ts
vendored
2
src/common/useStreamingServer.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useStreamingServer: () => StreamingServer;
|
||||
export = useStreamingServer;
|
||||
export = useStreamingServer;
|
||||
|
|
|
|||
2
src/modules.d.ts
vendored
2
src/modules.d.ts
vendored
|
|
@ -1,3 +1,3 @@
|
|||
declare module '*.less';
|
||||
declare module 'stremio/common';
|
||||
declare module 'stremio/common/*';
|
||||
declare module 'stremio/common/*';
|
||||
|
|
|
|||
2
src/routes/Addons/useInstalledAddons.d.ts
vendored
2
src/routes/Addons/useInstalledAddons.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useInstalledAddons: (urlParams: UrlParams) => InstalledAddons;
|
||||
export = useInstalledAddons;
|
||||
export = useInstalledAddons;
|
||||
|
|
|
|||
2
src/routes/Addons/useRemoteAddons.d.ts
vendored
2
src/routes/Addons/useRemoteAddons.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useRemoteAddons: (urlParams: UrlParams) => RemoteAddons;
|
||||
export = useRemoteAddons;
|
||||
export = useRemoteAddons;
|
||||
|
|
|
|||
2
src/routes/Board/useBoard.d.ts
vendored
2
src/routes/Board/useBoard.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useBoard: () => [Board, ({ start, end }: { start: number, end: number }) => void];
|
||||
export = useBoard;
|
||||
export = useBoard;
|
||||
|
|
|
|||
2
src/routes/Discover/useDiscover.d.ts
vendored
2
src/routes/Discover/useDiscover.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useDiscover: (urlParams: UrlParams, searchParams: URLSearchParams) => [Discover, () => void];
|
||||
export = useDiscover;
|
||||
export = useDiscover;
|
||||
|
|
|
|||
2
src/routes/Library/useLibrary.d.ts
vendored
2
src/routes/Library/useLibrary.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useLibrary: (model: string, urlParams: UrlParams, searchParams: URLSearchParams) => Library;
|
||||
export = useLibrary;
|
||||
export = useLibrary;
|
||||
|
|
|
|||
2
src/routes/MetaDetails/useMetaDetails.d.ts
vendored
2
src/routes/MetaDetails/useMetaDetails.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useMetaDetails: (urlParams: UrlParams) => MetaDetails;
|
||||
export = useMetaDetails;
|
||||
export = useMetaDetails;
|
||||
|
|
|
|||
2
src/routes/Player/usePlayer.d.ts
vendored
2
src/routes/Player/usePlayer.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const usePlayer: (urlParams: UrlParams, videoParams: any) => [Player, (time: number, duration: number, device: string) => void, (paused: boolean) => void, () => void, () => void];
|
||||
export = usePlayer;
|
||||
export = usePlayer;
|
||||
|
|
|
|||
2
src/routes/Player/useSettings.d.ts
vendored
2
src/routes/Player/useSettings.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useSettings: () => [Settings, (settings: any) => void];
|
||||
export = useSettings;
|
||||
export = useSettings;
|
||||
|
|
|
|||
2
src/routes/Search/useSearch.d.ts
vendored
2
src/routes/Search/useSearch.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare const useSearch: (searchParams: URLSearchParams) => [Search, (range: number) => void];
|
||||
export = useSearch;
|
||||
export = useSearch;
|
||||
|
|
|
|||
2
src/services/Core/Core.d.ts
vendored
2
src/services/Core/Core.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare function Core(): Core;
|
||||
export = Core;
|
||||
export = Core;
|
||||
|
|
|
|||
2
src/services/Core/CoreTransport.d.ts
vendored
2
src/services/Core/CoreTransport.d.ts
vendored
|
|
@ -1,2 +1,2 @@
|
|||
declare function CoreTransport(): CoreTransport;
|
||||
export = CoreTransport;
|
||||
export = CoreTransport;
|
||||
|
|
|
|||
2
src/services/Core/globals.d.ts
vendored
2
src/services/Core/globals.d.ts
vendored
|
|
@ -9,4 +9,4 @@ declare global {
|
|||
}
|
||||
}
|
||||
|
||||
export {};
|
||||
export {};
|
||||
|
|
|
|||
2
src/services/Core/types.d.ts
vendored
2
src/services/Core/types.d.ts
vendored
|
|
@ -25,4 +25,4 @@ interface CoreTransport {
|
|||
interface Core {
|
||||
active: boolean,
|
||||
transport: CoreTransport,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ function DragAndDrop({ core }) {
|
|||
args: Array.from(new Uint8Array(torrent))
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
events.emit('error', {
|
||||
message: 'Failed to process file',
|
||||
file: {
|
||||
|
|
|
|||
2
src/services/ServicesContext/types.d.ts
vendored
2
src/services/ServicesContext/types.d.ts
vendored
|
|
@ -4,4 +4,4 @@ type ServicesContext = {
|
|||
chromecast: any,
|
||||
keyboardShortcuts: any,
|
||||
dragAndDrop: any,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const useService: () => ServicesContext;
|
||||
export = useService;
|
||||
export = useService;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ function ShellTransport() {
|
|||
|
||||
this.props = {};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||
const shell = this;
|
||||
initialize()
|
||||
.then(() => {
|
||||
|
|
|
|||
2
src/types/Addon.d.ts
vendored
2
src/types/Addon.d.ts
vendored
|
|
@ -17,4 +17,4 @@ type Addon = {
|
|||
|
||||
type AddonsDeepLinks = {
|
||||
addons: string,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/LibraryItem.d.ts
vendored
2
src/types/LibraryItem.d.ts
vendored
|
|
@ -31,4 +31,4 @@ type LibraryItemDeepLinks = {
|
|||
metaDetailsStreams: string | null,
|
||||
player: string | null,
|
||||
externalPlayer: ExternalPlayerLinks | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/MetaItem.d.ts
vendored
2
src/types/MetaItem.d.ts
vendored
|
|
@ -29,4 +29,4 @@ type MetaItemDeepLinks = {
|
|||
metaDetailsVideos: string | null,
|
||||
metaDetailsStreams: string | null,
|
||||
player: string | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/Selectable.d.ts
vendored
2
src/types/Selectable.d.ts
vendored
|
|
@ -24,4 +24,4 @@ type SelectableCatalog<T> = {
|
|||
name: string,
|
||||
selected: boolean,
|
||||
deepLinks: T,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/Stream.d.ts
vendored
2
src/types/Stream.d.ts
vendored
|
|
@ -15,4 +15,4 @@ type Stream = {
|
|||
player: string,
|
||||
externalPlayer: ExternalPlayerLinks,
|
||||
},
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/Video.d.ts
vendored
2
src/types/Video.d.ts
vendored
|
|
@ -14,4 +14,4 @@ type Video = {
|
|||
episode?: number,
|
||||
streams: Stream[],
|
||||
trailerStreams: TrailerStream[],
|
||||
};
|
||||
};
|
||||
|
|
|
|||
4
src/types/global.d.ts
vendored
4
src/types/global.d.ts
vendored
|
|
@ -1,3 +1,5 @@
|
|||
/* eslint-disable no-var */
|
||||
|
||||
interface QtTransport {
|
||||
send: (message: string) => void,
|
||||
}
|
||||
|
|
@ -10,4 +12,4 @@ declare global {
|
|||
var qt: Qt | undefined;
|
||||
}
|
||||
|
||||
export { };
|
||||
export { };
|
||||
|
|
|
|||
2
src/types/models/Board.d.ts
vendored
2
src/types/models/Board.d.ts
vendored
|
|
@ -1 +1 @@
|
|||
type Board = CatalogsWithExtra;
|
||||
type Board = CatalogsWithExtra;
|
||||
|
|
|
|||
2
src/types/models/CatalogsWithExtra.d.ts
vendored
2
src/types/models/CatalogsWithExtra.d.ts
vendored
|
|
@ -8,4 +8,4 @@ type CatalogsWithExtra = {
|
|||
type: string | null,
|
||||
extra: [string, string][]
|
||||
} | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/Ctx.d.ts
vendored
2
src/types/models/Ctx.d.ts
vendored
|
|
@ -71,4 +71,4 @@ type Ctx = {
|
|||
profile: Profile,
|
||||
notifications: Notifications,
|
||||
searchHistory: SearchHistory,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/Discover.d.ts
vendored
2
src/types/models/Discover.d.ts
vendored
|
|
@ -23,4 +23,4 @@ type Discover = {
|
|||
selected: {
|
||||
request: ResourceRequest,
|
||||
} | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/InstalledAddons.d.ts
vendored
2
src/types/models/InstalledAddons.d.ts
vendored
|
|
@ -9,4 +9,4 @@ type InstalledAddons = {
|
|||
type: string,
|
||||
}
|
||||
} | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/Library.d.ts
vendored
2
src/types/models/Library.d.ts
vendored
|
|
@ -26,4 +26,4 @@ type Library = {
|
|||
type: string | null,
|
||||
}
|
||||
} | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/LocalSearch.d.ts
vendored
2
src/types/models/LocalSearch.d.ts
vendored
|
|
@ -7,4 +7,4 @@ type LocalSearchItem = {
|
|||
|
||||
type LocalSearch = {
|
||||
items: LocalSearchItem[],
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/MetaDetails.d.ts
vendored
2
src/types/models/MetaDetails.d.ts
vendored
|
|
@ -24,4 +24,4 @@ type MetaDetails = {
|
|||
content: Loadable<Stream[]>
|
||||
}[],
|
||||
title: string | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/Player.d.ts
vendored
2
src/types/models/Player.d.ts
vendored
|
|
@ -42,4 +42,4 @@ type Player = {
|
|||
} | null,
|
||||
subtitles: Subtitle[],
|
||||
title: string | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/RemoteAddons.d.ts
vendored
2
src/types/models/RemoteAddons.d.ts
vendored
|
|
@ -7,4 +7,4 @@ type RemoteAddons = {
|
|||
selected: {
|
||||
request: ResourceRequest,
|
||||
} | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
2
src/types/models/Search.d.ts
vendored
2
src/types/models/Search.d.ts
vendored
|
|
@ -1 +1 @@
|
|||
type Search = CatalogsWithExtra;
|
||||
type Search = CatalogsWithExtra;
|
||||
|
|
|
|||
2
src/types/models/StremingServer.d.ts
vendored
2
src/types/models/StremingServer.d.ts
vendored
|
|
@ -115,4 +115,4 @@ type StreamingServer = {
|
|||
torrent: [string, Loadable<Torrent>] | null,
|
||||
statistics: Loadable<Statistics> | null,
|
||||
playbackDevices: Loadable<PlaybackDevice[]> | null,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
4
src/types/types.d.ts
vendored
4
src/types/types.d.ts
vendored
|
|
@ -51,7 +51,7 @@ type BehaviorHints = {
|
|||
hasScheduledVideos: boolean,
|
||||
};
|
||||
|
||||
type PosterShape = 'square' | 'landscape' | 'poster' | null;
|
||||
type PosterShape = 'square' | 'landscape' | 'poster' | null;
|
||||
|
||||
type Catalog<T, D = any> = {
|
||||
label?: string,
|
||||
|
|
@ -60,4 +60,4 @@ type Catalog<T, D = any> = {
|
|||
content: T,
|
||||
installed?: boolean,
|
||||
deepLinks?: D,
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ module.exports = (env, argv) => ({
|
|||
new CleanWebpackPlugin({
|
||||
cleanOnceBeforeBuildPatterns: ['*']
|
||||
}),
|
||||
argv.mode === 'production' &&
|
||||
argv.mode === 'production' &&
|
||||
new WorkboxPlugin.GenerateSW({
|
||||
maximumFileSizeToCacheInBytes: 20000000,
|
||||
clientsClaim: true,
|
||||
|
|
|
|||
Loading…
Reference in a new issue